diff --git a/README.md b/README.md index 76edbcec..8b59888f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,68 @@ # argoproj-deployments -This repository contains definition of Argoproj CI/CD infrastructure: +This repository contains the infrastructure definition of the Argoproj [Official Demo](https://cd.apps.argoproj.io/). To learn more about Argoproj, visit [argoproj.io](https://argoproj.github.io/). -- 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 NGINX](https://docs.nginx.com/nginx-ingress-controller/overview/) | | +| [![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) \ No newline at end of file +## 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 diff --git a/argocd/base/sync-project.yaml b/argocd/base/sync-project.yaml new file mode 100644 index 00000000..67c81d9e --- /dev/null +++ b/argocd/base/sync-project.yaml @@ -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 Argo CD Application and ApplicationSet CR + 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 diff --git a/argoproj/base/argo-cd.yaml b/argoproj/base/argo-cd.yaml index 4528464f..c9b7a891 100644 --- a/argoproj/base/argo-cd.yaml +++ b/argoproj/base/argo-cd.yaml @@ -3,6 +3,9 @@ kind: Application metadata: name: argo-cd namespace: argocd + ### Just as a prevention, we do not want Argo CD to self delete + # finalizers: + # - resources-finalizer.argocd.argoproj.io spec: destination: namespace: argocd @@ -12,3 +15,10 @@ spec: path: argocd repoURL: https://github.com/argoproj/argoproj-deployments targetRevision: HEAD + syncPolicy: + syncOptions: + - CreateNamespace=true + ### Disable Argo CD auto-sync to better control updates of what is merged upstream + # automated: + # prune: true + # selfHeal: true diff --git a/argoproj/base/argo-events.yaml b/argoproj/base/argo-events.yaml index a4399c31..a24782a7 100644 --- a/argoproj/base/argo-events.yaml +++ b/argoproj/base/argo-events.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: argo-events namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: workflow-playground diff --git a/argoproj/base/argo-rollouts.yaml b/argoproj/base/argo-rollouts.yaml index cde2082e..94013a66 100644 --- a/argoproj/base/argo-rollouts.yaml +++ b/argoproj/base/argo-rollouts.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: argo-rollouts namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: default source: diff --git a/argoproj/base/argo-workflows.yaml b/argoproj/base/argo-workflows.yaml index 4822bf6c..ee559b14 100644 --- a/argoproj/base/argo-workflows.yaml +++ b/argoproj/base/argo-workflows.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: argo-workflows namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: argo diff --git a/argoproj/base/argocd-image-updater.yaml b/argoproj/base/argocd-image-updater.yaml index 7155c7c9..38d9c3b0 100644 --- a/argoproj/base/argocd-image-updater.yaml +++ b/argoproj/base/argocd-image-updater.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: argocd-image-updater namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: argocd diff --git a/argoproj/base/cert-manager.yaml b/argoproj/base/cert-manager.yaml index 21b2f221..073c9f98 100644 --- a/argoproj/base/cert-manager.yaml +++ b/argoproj/base/cert-manager.yaml @@ -3,6 +3,9 @@ kind: Application metadata: name: cert-manager namespace: argocd + ### Just as a prevention, we do not want Argo CD to destruct it's dependencies + # finalizers: + # - resources-finalizer.argocd.argoproj.io spec: destination: namespace: cert-manager diff --git a/argoproj/base/dex.yaml b/argoproj/base/dex.yaml index c9eb1dbb..9658a045 100644 --- a/argoproj/base/dex.yaml +++ b/argoproj/base/dex.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: dex namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: dex diff --git a/argoproj/base/external-dns.yaml b/argoproj/base/external-dns.yaml index 60961ac1..9c9fca58 100644 --- a/argoproj/base/external-dns.yaml +++ b/argoproj/base/external-dns.yaml @@ -3,6 +3,9 @@ kind: Application metadata: name: external-dns namespace: argocd + ### Just as a prevention, we do not want Argo CD to destruct it's dependencies + # finalizers: + # - resources-finalizer.argocd.argoproj.io spec: source: path: external-dns diff --git a/argoproj/base/governor.yaml b/argoproj/base/governor.yaml index 261d480b..d15b8a93 100644 --- a/argoproj/base/governor.yaml +++ b/argoproj/base/governor.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: governor namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: governor diff --git a/argoproj/base/ingress-nginx.yaml b/argoproj/base/ingress-nginx.yaml index 8726b891..dfe9d5ba 100644 --- a/argoproj/base/ingress-nginx.yaml +++ b/argoproj/base/ingress-nginx.yaml @@ -3,6 +3,9 @@ kind: Application metadata: name: ingress-nginx namespace: argocd + ### Just as a prevention, we do not want Argo CD to destruct it's dependencies + # finalizers: + # - resources-finalizer.argocd.argoproj.io spec: destination: namespace: ingress-nginx diff --git a/argoproj/base/istio-addons.yaml b/argoproj/base/istio-addons.yaml index 5190213f..0f366d15 100644 --- a/argoproj/base/istio-addons.yaml +++ b/argoproj/base/istio-addons.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: istio-addons namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: source: path: samples/addons diff --git a/argoproj/base/istio-controlplane.yaml b/argoproj/base/istio-controlplane.yaml index 689af560..016d51a2 100644 --- a/argoproj/base/istio-controlplane.yaml +++ b/argoproj/base/istio-controlplane.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: istio-controlplane namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: source: path: istio-controlplane diff --git a/argoproj/base/istio-operator.yaml b/argoproj/base/istio-operator.yaml index e44b0c19..263f6853 100644 --- a/argoproj/base/istio-operator.yaml +++ b/argoproj/base/istio-operator.yaml @@ -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 diff --git a/argoproj/base/prometheus-operator.yaml b/argoproj/base/prometheus-operator.yaml index 5014abea..29a14d6f 100644 --- a/argoproj/base/prometheus-operator.yaml +++ b/argoproj/base/prometheus-operator.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: prometheus-operator namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: default source: diff --git a/argoproj/base/sync-argoproj.yaml b/argoproj/base/sync-argoproj.yaml new file mode 100644 index 00000000..9146fa76 --- /dev/null +++ b/argoproj/base/sync-argoproj.yaml @@ -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 diff --git a/argoproj/base/sync-example-apps.yaml b/argoproj/base/sync-example-apps.yaml new file mode 100644 index 00000000..4358da36 --- /dev/null +++ b/argoproj/base/sync-example-apps.yaml @@ -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 diff --git a/argoproj/base/workflow-examples.yaml b/argoproj/base/workflow-examples.yaml index 38a9c282..2e4a9e8e 100644 --- a/argoproj/base/workflow-examples.yaml +++ b/argoproj/base/workflow-examples.yaml @@ -3,6 +3,8 @@ kind: Application metadata: name: workflow-examples namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: destination: namespace: workflow-playground diff --git a/argoproj/kustomization.yaml b/argoproj/kustomization.yaml index 8862c632..ce8513d4 100644 --- a/argoproj/kustomization.yaml +++ b/argoproj/kustomization.yaml @@ -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 diff --git a/infrastructure/terraform/gcp/README.md b/infrastructure/terraform/gcp/README.md index 260d0828..d9f721cf 100644 --- a/infrastructure/terraform/gcp/README.md +++ b/infrastructure/terraform/gcp/README.md @@ -19,7 +19,7 @@ In a new account, the modules can be deployed in the following order: 3. Network 4. GKE -Once a cluster has been provisioned, ArgoCD is used to deploy applications into it. +Once a cluster has been provisioned, Argo CD is used to deploy applications into it. ### [User access](./user-access/README.md) @@ -42,8 +42,8 @@ The GKE module provision one or more GKE clusters. ## Argo CD deployment -After the GKE cluster is deployed, you can deploy ArgoCD on it and use Applications resources to provision other -components. Some componenets that are dependencies for ArgoCD to work properly, such as Certificate Manager, will +After the GKE cluster is deployed, you can deploy Argo CD on it and use Applications resources to provision other +components. Some componenets that are dependencies for Argo CD to work properly, such as Certificate Manager, will need to be deployed manually first. ```