Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync with apps-of-apps (#32) #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 63 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,68 @@
# argoproj-deployments

This repository contains definition of Argoproj CI/CD infrastructure:
This repository contains the infrastructure definition of the Argoproj [fficial Demo](cd.). To learn more about Argoproj, visit [argoproj.io](https://argoproj.github.io/).
agaudreault marked this conversation as resolved.
Show resolved Hide resolved

- argo-workflows - [![App Status](https://cd.apps.argoproj.io/api/badge?name=argo-workflows)](https://cd.apps.argoproj.io/applications/argo-workflows)
- argocd - includes argocd components. [![App Status](https://cd.apps.argoproj.io/api/badge?name=argo-cd)](https://cd.apps.argoproj.io/applications/argo-cd)
- cert-manager - cert-manager components. [![App Status](https://cd.apps.argoproj.io/api/badge?name=cert-manager)](https://cd.apps.argoproj.io/applications/cert-manager)
- argocd-image-updater - argocd-image-updater components. [![App Status](https://cd.apps.argoproj.io/api/badge?name=argocd-image-updater)](https://cd.apps.argoproj.io/applications/argocd-image-updater)
- argoproj - packages all together: includes namespaces and argocd applications definitions. [![App Status](https://cd.apps.argoproj.io/api/badge?name=argoproj)](https://cd.apps.argoproj.io/applications/argoproj)
- dex [![App Status](https://cd.apps.argoproj.io/api/badge?name=dex)](https://cd.apps.argoproj.io/applications/dex)
## Applications

| Status | Application | Endpoint |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [![App Status][badge_argo_cd]][app_argo_cd] | [Argo CD](https://argoproj.github.io/cd) | [cd.apps.argoproj.io](https://cd.apps.argoproj.io/) |
| [![App Status][badge_argo_events]][app_events] | [Argo Events](https://argoproj.github.io/events) | |
| [![App Status][badge_argo_rollouts]][app_argo_rollouts] | [Argo Rollouts](https://argoproj.github.io/rollouts) | |
| [![App Status][badge_argo_workflows]][app_argo_workflows] | [Argo Workflows](https://argoproj.github.io/workflows/) | [workflows.apps.argoproj.io](https://workflows.apps.argoproj.io/) |
| [![App Status][badge_argo_image_updater]][app_argo_image_updater] | [Argo CD Image Updater](https://argocd-image-updater.readthedocs.io/en/stable/) | |
| [![App Status][badge_cert_manager]][app_cert_manager] | [Cert Manager](https://cert-manager.io/) | |
| [![App Status][badge_dex]][app_dex] | [Dex](https://dexidp.io/) | |
| [![App Status][badge_external_dns]][app_external_dns] | [External-DNS](https://kubernetes-sigs.github.io/external-dns) | |
| [![App Status][badge_governor]][app_governor] | [Governor](https://github.com/keikoproj/governor) | |
| [![App Status][badge_ingress_nginx]][app_ingress_nginx] | [Ingress NGXIN](https://docs.nginx.com/nginx-ingress-controller/overview/) | |
agaudreault marked this conversation as resolved.
Show resolved Hide resolved
| [![App Status][badge_istio_addons]][app_istio_addons] | [Istio Addons](https://github.com/istio/istio/tree/master/samples/addons) | |
| [![App Status][badge_istio]][app_istio] | [Istio](https://istio.io/) | |
| [![App Status][badge_istio_operator]][app_istio_operator] | [Istio Operator](https://istio.io/latest/docs/setup/install/operator/) | |
| [![App Status][badge_prometheus]][app_prometheus] | [Prometheus](https://prometheus.io/) | [grafana.apps.argoproj.io](https://grafana.apps.argoproj.io/) |
| [![App Status][badge_sync_argoproj]][app_sync_argoproj] | [Sync Argoproj](https://github.com/argoproj/argoproj-deployments) | |
| [![App Status][badge_sync_example_apps]][app_sync_example_apps] | [Sync Example Apps](https://github.com/argoproj/argocd-example-apps) | |
| [![App Status][badge_workflow_example]][app_workflow_example] | [Workfolw Examples](https://github.com/argoproj-labs/argo-workflows-catalog) | |

* [Argo Workflows Github Webhook](https://github.com/argoproj/argo/settings/hooks/263222342)
* [DEX OpenID](https://dex.apps.argoproj.io/dex/.well-known/openid-configuration)
## Infrastructure

The infrastructure code is located under the [infrastructure/terraform](./infrastructure/terraform/gcp/README.md) folder.

### External Configurations

- [Argo Workflows Github Webhook](https://github.com/argoproj/argo/settings/hooks/263222342)

[app_argo_cd]: https://cd.apps.argoproj.io/applications/argo-cd
[badge_argo_cd]: https://cd.apps.argoproj.io/api/badge?revision=true&name=argo-cd
[app_events]: https://cd.apps.argoproj.io/applications/argo-events
[badge_argo_events]: https://cd.apps.argoproj.io/api/badge?revision=true&name=argo-events
[app_argo_rollouts]: https://cd.apps.argoproj.io/applications/argo-rollouts
[badge_argo_rollouts]: https://cd.apps.argoproj.io/api/badge?revision=true&name=argo-rollouts
[app_argo_workflows]: https://cd.apps.argoproj.io/applications/argo-workflows
[badge_argo_workflows]: https://cd.apps.argoproj.io/api/badge?revision=true&name=argo-workflows
[app_argo_image_updater]: https://cd.apps.argoproj.io/applications/argocd-image-updater
[badge_argo_image_updater]: https://cd.apps.argoproj.io/api/badge?revision=true&name=argocd-image-updater
[app_cert_manager]: https://cd.apps.argoproj.io/applications/cert-manager
[badge_cert_manager]: https://cd.apps.argoproj.io/api/badge?revision=true&name=cert-manager
[app_dex]: https://cd.apps.argoproj.io/applications/dex
[badge_dex]: https://cd.apps.argoproj.io/api/badge?revision=true&name=dex
[app_external_dns]: https://cd.apps.argoproj.io/applications/external-dns
[badge_external_dns]: https://cd.apps.argoproj.io/api/badge?revision=true&name=external-dns
[app_governor]: https://cd.apps.argoproj.io/applications/governor
[badge_governor]: https://cd.apps.argoproj.io/api/badge?revision=true&name=governor
[app_ingress_nginx]: https://cd.apps.argoproj.io/applications/ingress-nginx
[badge_ingress_nginx]: https://cd.apps.argoproj.io/api/badge?revision=true&name=ingress-nginx
[app_istio_addons]: https://cd.apps.argoproj.io/applications/istio-addons
[badge_istio_addons]: https://cd.apps.argoproj.io/api/badge?revision=true&name=istio-addons
[app_istio]: https://cd.apps.argoproj.io/applications/istio-controlplane
[badge_istio]: https://cd.apps.argoproj.io/api/badge?revision=true&name=istio-controlplane
[app_istio_operator]: https://cd.apps.argoproj.io/applications/istio-operator
[badge_istio_operator]: https://cd.apps.argoproj.io/api/badge?revision=true&name=istio-operator
[app_prometheus]: https://cd.apps.argoproj.io/applications/prometheus-operator
[badge_prometheus]: https://cd.apps.argoproj.io/api/badge?revision=true&name=prometheus-operator
[app_sync_argoproj]: https://cd.apps.argoproj.io/applications/sync-argoproj
[badge_sync_argoproj]: https://cd.apps.argoproj.io/api/badge?revision=true&name=sync-argoproj
[app_sync_example_apps]: https://cd.apps.argoproj.io/applications/sync-example-apps
[badge_sync_example_apps]: https://cd.apps.argoproj.io/api/badge?revision=true&name=sync-example-apps
[app_workflow_example]: https://cd.apps.argoproj.io/applications/workflow-examples
[badge_workflow_example]: https://cd.apps.argoproj.io/api/badge?revision=true&name=workflow-examples
20 changes: 20 additions & 0 deletions argocd/base/sync-project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: sync
namespace: argocd
annotations:
argocd.argoproj.io/sync-options: Prune=false
spec:
description: Project used to Sync the ArgoCD Application and ApplicationSet CR
agaudreault marked this conversation as resolved.
Show resolved Hide resolved
namespaceResourceWhitelist:
- group: argoproj.io
kind: Application
- group: argoproj.io
kind: ApplicationSet
destinations:
- namespace: argocd
server: https://kubernetes.default.svc
sourceRepos:
- https://github.com/argoproj/argoproj-deployments
- https://github.com/argoproj/argocd-example-apps
10 changes: 10 additions & 0 deletions argoproj/base/argo-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Application
metadata:
name: argo-cd
namespace: argocd
### Just as a prevention, we do not want ArgoCD to self delete
# finalizers:
# - resources-finalizer.argocd.argoproj.io
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meant to still be commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though that leaving the config commented out with the explanation on top was I good idea, this way people that look at the apps aren't asking themselves why is there no finalizer to this app or why isn't the sync enabled? was it on purpose or someone forgot?

Since it is a demo setup, I think it is interesting to explicitly explain why it is commented.

ditto for all commented sections in Apps.

What do you think?

spec:
destination:
namespace: argocd
Expand All @@ -12,3 +15,10 @@ spec:
path: argocd
repoURL: https://github.com/argoproj/argoproj-deployments
targetRevision: HEAD
syncPolicy:
syncOptions:
- CreateNamespace=true
### Disable ArgoCD auto-sync to better control updates of what is merged upstream
# automated:
# prune: true
# selfHeal: true
2 changes: 2 additions & 0 deletions argoproj/base/argo-events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: argo-events
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: workflow-playground
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/argo-rollouts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: argo-rollouts
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/argo-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: argo-workflows
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argo
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/argocd-image-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: argocd-image-updater
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argocd
Expand Down
3 changes: 3 additions & 0 deletions argoproj/base/cert-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Application
metadata:
name: cert-manager
namespace: argocd
### Just as a prevention, we do not want ArgoCD to destruct it's dependencies
# finalizers:
# - resources-finalizer.argocd.argoproj.io
agaudreault marked this conversation as resolved.
Show resolved Hide resolved
spec:
destination:
namespace: cert-manager
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/dex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: dex
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: dex
Expand Down
3 changes: 3 additions & 0 deletions argoproj/base/external-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Application
metadata:
name: external-dns
namespace: argocd
### Just as a prevention, we do not want ArgoCD to destruct it's dependencies
# finalizers:
# - resources-finalizer.argocd.argoproj.io
agaudreault marked this conversation as resolved.
Show resolved Hide resolved
spec:
source:
path: external-dns
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/governor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: governor
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: governor
Expand Down
3 changes: 3 additions & 0 deletions argoproj/base/ingress-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Application
metadata:
name: ingress-nginx
namespace: argocd
### Just as a prevention, we do not want ArgoCD to destruct it's dependencies
# finalizers:
# - resources-finalizer.argocd.argoproj.io
agaudreault marked this conversation as resolved.
Show resolved Hide resolved
spec:
destination:
namespace: ingress-nginx
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/istio-addons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: istio-addons
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
source:
path: samples/addons
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/istio-controlplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: istio-controlplane
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
source:
path: istio-controlplane
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/istio-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: istio-operator
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
source:
repoURL: https://github.com/istio/istio
Expand Down
2 changes: 2 additions & 0 deletions argoproj/base/prometheus-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: prometheus-operator
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
Expand Down
28 changes: 28 additions & 0 deletions argoproj/base/sync-argoproj.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: sync-argoproj
namespace: argocd
spec:
destination:
namespace: argocd
server: https://kubernetes.default.svc
project: sync
source:
path: argoproj
repoURL: https://github.com/argoproj/argoproj-deployments
targetRevision: HEAD
ignoreDifferences:
# Allow to disable sync in the UI for managed applications
- group: argoproj.io
kind: Application
managedFieldsManagers:
- argocd-server
jsonPointers:
- /spec/syncPolicy/automated
syncPolicy:
syncOptions:
- RespectIgnoreDifferences=true
automated:
prune: true
selfHeal: true
28 changes: 28 additions & 0 deletions argoproj/base/sync-example-apps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: sync-example-apps
namespace: argocd
spec:
destination:
namespace: argocd
server: https://kubernetes.default.svc
project: sync
source:
path: apps
repoURL: https://github.com/argoproj/argocd-example-apps
targetRevision: HEAD
ignoreDifferences:
# Allow to disable sync in the UI for managed applications
- group: argoproj.io
kind: Application
managedFieldsManagers:
- argocd-server
jsonPointers:
- /spec/syncPolicy/automated
syncPolicy:
syncOptions:
- RespectIgnoreDifferences=true
automated:
prune: true
selfHeal: true
2 changes: 2 additions & 0 deletions argoproj/base/workflow-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Application
metadata:
name: workflow-examples
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: workflow-playground
Expand Down
2 changes: 2 additions & 0 deletions argoproj/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ resources:
- base/istio-controlplane.yaml
- base/istio-operator.yaml
- base/prometheus-operator.yaml
- base/sync-argoproj.yaml
- base/sync-example-apps.yaml
- base/workflow-examples.yaml