├── application set ├── cluster-generator-all.yaml ├── cluster-generator-matching-labels.yaml ├── git-directory-generator.yaml ├── list-generator.yaml ├── matrix-generator.yaml └── pull-request-generator.yaml ├── applications and projects ├── application - Automated Prune.yaml ├── application - Automated Self-Healing.yaml ├── application - Automated Sync.yaml ├── application - Diffing Customization for istio.yaml ├── application - Diffing Customization.yaml ├── application - Directory options.yaml ├── application - Helm options.yaml ├── application - dev project.yaml ├── application - kustomize options.yaml ├── application - remote cluster.yaml ├── application - set project.yaml ├── application-with-private-repo-ssh.yaml ├── application-with-private-repo.yaml ├── application.yaml ├── multiple-sources │ ├── ingress-nginx.yaml │ └── redis.yaml ├── project - role.yaml ├── project - whitelist namespace.yaml ├── project.yaml ├── sync-options │ ├── application - Fail On Shared Resources.yaml │ ├── application - No prune.yaml │ ├── application - Replace.yaml │ └── application - Selective Sync.yaml ├── sync-phases-waves │ ├── application - resources hooks.yaml │ └── application - sync waves.yaml ├── tracking-strategies │ ├── application - tracking git commit sha.yaml │ ├── application - tracking git head.yaml │ ├── application - tracking git tag.yaml │ ├── application - tracking helm latest version.yaml │ └── application - tracking helm range.yaml └── webapp-sample-application │ └── webapp application.yaml ├── argocd-install └── overlays │ ├── non-production │ ├── argocd-namespace.yaml │ ├── config │ │ └── argocd-cmd-params-cm.yaml │ └── kustomization.yaml │ └── production │ ├── argocd-namespace.yaml │ ├── config │ └── argocd-cmd-params-cm.yaml │ └── kustomization.yaml ├── clusters ├── local-cluster.yaml └── staging-digitalocean.yaml └── repos ├── private-repo-creds-https.yaml ├── private-repo-https.yaml └── private-repo-ssh.yaml /application set/cluster-generator-all.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: guestbook-1 5 | namespace: argocd 6 | spec: 7 | generators: 8 | - clusters: {} 9 | template: 10 | metadata: 11 | name: '{{name}}-guestbook-1' 12 | namespace: argocd 13 | spec: 14 | project: default 15 | source: 16 | repoURL: https://github.com/mabusaa/argocd-example-apps.git 17 | targetRevision: master 18 | path: guestbook 19 | destination: 20 | server: '{{server}}' 21 | namespace: guestbook-1 22 | syncPolicy: 23 | syncOptions: 24 | - CreateNamespace=true -------------------------------------------------------------------------------- /application set/cluster-generator-matching-labels.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: guestbook-2 5 | namespace: argocd 6 | spec: 7 | generators: 8 | - clusters: 9 | selector: 10 | matchLabels: 11 | non-prod: "true" 12 | 13 | template: 14 | metadata: 15 | name: '{{name}}-guestbook-2' 16 | namespace: argocd 17 | spec: 18 | project: default 19 | source: 20 | repoURL: https://github.com/mabusaa/argocd-example-apps.git 21 | targetRevision: master 22 | path: guestbook 23 | destination: 24 | server: '{{server}}' 25 | namespace: guestbook-2 26 | syncPolicy: 27 | syncOptions: 28 | - CreateNamespace=true -------------------------------------------------------------------------------- /application set/git-directory-generator.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: security-apps 5 | namespace: argocd 6 | spec: 7 | generators: 8 | - git: 9 | repoURL: https://github.com/mabusaa/argocd-example-apps.git 10 | revision: master 11 | directories: 12 | - path: helmcharts/security-policy-charts/* 13 | template: 14 | metadata: 15 | name: '{{path.basename}}' 16 | namespace: argocd 17 | spec: 18 | project: default 19 | source: 20 | repoURL: https://github.com/mabusaa/argocd-example-apps.git 21 | targetRevision: master 22 | path: '{{path}}' 23 | destination: 24 | server: https://kubernetes.default.svc 25 | namespace: '{{path.basename}}' 26 | syncPolicy: 27 | syncOptions: 28 | - CreateNamespace=true -------------------------------------------------------------------------------- /application set/list-generator.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: guestbook 5 | namespace: argocd 6 | spec: 7 | generators: 8 | - list: 9 | elements: 10 | - cluster: local-dev 11 | url: https://kubernetes.default.svc 12 | - cluster: staging-digitalocean 13 | url: https://c50189b1-bb18-4a46-b772-b045e0ed4fde.k8s.ondigitalocean.com 14 | template: 15 | metadata: 16 | name: '{{cluster}}-guestbook' 17 | namespace: argocd 18 | spec: 19 | project: default 20 | source: 21 | repoURL: https://github.com/mabusaa/argocd-example-apps.git 22 | targetRevision: master 23 | path: guestbook 24 | destination: 25 | server: '{{url}}' 26 | namespace: guestbook 27 | syncPolicy: 28 | syncOptions: 29 | - CreateNamespace=true -------------------------------------------------------------------------------- /application set/matrix-generator.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: security-apps-matrix 5 | namespace: argocd 6 | spec: 7 | generators: 8 | - matrix: 9 | generators: 10 | - git: 11 | repoURL: https://github.com/mabusaa/argocd-example-apps.git 12 | revision: master 13 | directories: 14 | - path: helmcharts/security-policy-charts/* 15 | - clusters: 16 | selector: 17 | matchLabels: 18 | non-prod: "true" 19 | template: 20 | metadata: 21 | name: '{{ nameNormalized }}-{{path.basename}}' 22 | namespace: argocd 23 | spec: 24 | project: default 25 | source: 26 | repoURL: https://github.com/mabusaa/argocd-example-apps.git 27 | targetRevision: master 28 | path: '{{path}}' 29 | destination: 30 | server: '{{server}}' 31 | namespace: '{{ nameNormalized }}-{{path.basename}}' 32 | syncPolicy: 33 | syncOptions: 34 | - CreateNamespace=true -------------------------------------------------------------------------------- /application set/pull-request-generator.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: webapp-review 5 | namespace: argocd 6 | spec: 7 | generators: 8 | - pullRequest: 9 | github: 10 | # The GitHub organization or user. 11 | owner: mabusaa 12 | # The Github repository 13 | repo: argocd-course-webapp 14 | # Labels is used to filter the PRs that you want to target. (optional) 15 | labels: 16 | - preview 17 | requeueAfterSeconds: 90 18 | template: 19 | metadata: 20 | name: 'webapp-{{branch}}-{{number}}' 21 | namespace: argocd 22 | spec: 23 | source: 24 | repoURL: 'https://github.com/mabusaa/argocd-course-webapp.git' 25 | targetRevision: '{{head_sha}}' 26 | path: helm/webapp 27 | project: "default" 28 | destination: 29 | server: https://kubernetes.default.svc 30 | namespace: webapp-{{branch}}-{{number}} 31 | syncPolicy: 32 | syncOptions: 33 | - CreateNamespace=true -------------------------------------------------------------------------------- /applications and projects/application - Automated Prune.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: auto-pruning-demo 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: auto-pruning-demo 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook-with-sub-directories 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: 19 | prune: true 20 | syncOptions: 21 | - CreateNamespace=true 22 | 23 | 24 | -------------------------------------------------------------------------------- /applications and projects/application - Automated Self-Healing.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: auto-selfheal-demo 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: auto-selfheal-demo 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook-with-sub-directories 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: 19 | selfHeal: true 20 | syncOptions: 21 | - CreateNamespace=true 22 | 23 | 24 | -------------------------------------------------------------------------------- /applications and projects/application - Automated Sync.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: auto-sync-app 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: auto-sync-app 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook-with-sub-directories 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | 22 | 23 | -------------------------------------------------------------------------------- /applications and projects/application - Diffing Customization for istio.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: istiod 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: istio-system 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | repoURL: 'https://istio-release.storage.googleapis.com/charts' 13 | targetRevision: 1.13.4 14 | chart: istiod 15 | syncPolicy: 16 | automated: {} 17 | syncOptions: 18 | - CreateNamespace=true 19 | ignoreDifferences: 20 | - group: admissionregistration.k8s.io 21 | kind: MutatingWebhookConfiguration 22 | jqPathExpressions: 23 | - '.webhooks[]?.clientConfig.caBundle' 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /applications and projects/application - Diffing Customization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: diffing-customization-demo 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: diffing-customization-demo 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook-with-sub-directories 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | ignoreDifferences: 22 | - group: apps 23 | kind: Deployment 24 | jsonPointers: 25 | - /spec/replicas 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /applications and projects/application - Directory options.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: directory-app 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: directory-app 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook-with-sub-directories 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | syncOptions: 19 | - CreateNamespace=true 20 | 21 | 22 | -------------------------------------------------------------------------------- /applications and projects/application - Helm options.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: helm-app 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: helm-app 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: helm-guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | helm: 16 | releaseName: my-release 17 | syncPolicy: 18 | syncOptions: 19 | - CreateNamespace=true 20 | 21 | 22 | -------------------------------------------------------------------------------- /applications and projects/application - dev project.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: guestbook-dev-project 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: ns-1 9 | server: "https://kubernetes.default.svc" 10 | project: dev-project 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | -------------------------------------------------------------------------------- /applications and projects/application - kustomize options.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: kustomize-app 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: kustomize-app 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: kustomize-guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | kustomize: 16 | namePrefix: staging- 17 | commonLabels: 18 | app: demo 19 | syncPolicy: 20 | syncOptions: 21 | - CreateNamespace=true 22 | 23 | 24 | -------------------------------------------------------------------------------- /applications and projects/application - remote cluster.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: guestbook-staging 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: guestbook-staging 9 | server: "https://c50189b1-bb18-4a46-b772-b045e0ed4fde.k8s.ondigitalocean.com" 10 | project: default 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | -------------------------------------------------------------------------------- /applications and projects/application - set project.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: guestbook-demo-project 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: guestbook-demo-project 9 | server: "https://kubernetes.default.svc" 10 | project: demo-project 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | -------------------------------------------------------------------------------- /applications and projects/application-with-private-repo-ssh.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: guestbook-ssh 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: guestbook-ssh 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook 13 | repoURL: "git@github.com:mabusaa/argocd-example-apps-private.git" 14 | targetRevision: main 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | -------------------------------------------------------------------------------- /applications and projects/application-with-private-repo.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: guestbook-1 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: guestbook-1 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps-private.git" 14 | targetRevision: main 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | -------------------------------------------------------------------------------- /applications and projects/application.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: guestbook 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: guestbook 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | -------------------------------------------------------------------------------- /applications and projects/multiple-sources/ingress-nginx.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: ingress-nginx 5 | namespace: argocd 6 | spec: 7 | project: default 8 | destination: 9 | server: https://kubernetes.default.svc 10 | namespace: ingress-nginx 11 | sources: 12 | - chart: ingress-nginx 13 | repoURL: https://kubernetes.github.io/ingress-nginx 14 | targetRevision: 4.6.1 15 | helm: 16 | valueFiles: 17 | - $values/ingress-nginx/values.yaml 18 | - repoURL: https://github.com/mabusaa/argocd-example-apps.git 19 | ref: values 20 | targetRevision: master 21 | syncPolicy: 22 | syncOptions: 23 | - CreateNamespace=true -------------------------------------------------------------------------------- /applications and projects/multiple-sources/redis.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: redis 5 | namespace: argocd 6 | spec: 7 | project: default 8 | destination: 9 | server: https://kubernetes.default.svc 10 | namespace: redis 11 | sources: 12 | - chart: redis 13 | repoURL: https://charts.bitnami.com/bitnami 14 | targetRevision: 17.10.2 15 | - chart: prometheus-redis-exporter 16 | repoURL: https://prometheus-community.github.io/helm-charts 17 | targetRevision: 5.3.2 18 | syncPolicy: 19 | syncOptions: 20 | - CreateNamespace=true -------------------------------------------------------------------------------- /applications and projects/project - role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: AppProject 3 | metadata: 4 | name: project-with-role 5 | namespace: argocd 6 | spec: 7 | description: project-with-role description 8 | sourceRepos: 9 | - '*' 10 | 11 | destinations: 12 | - namespace: '*' 13 | server: '*' 14 | 15 | clusterResourceWhitelist: 16 | - group: '*' 17 | kind: '*' 18 | 19 | namespaceResourceWhitelist: 20 | - group: '*' 21 | kind: '*' 22 | 23 | roles: 24 | - name: ci-role 25 | description: Sync privileges for project-with-role 26 | policies: 27 | - p, proj:project-with-role:ci-role, applications, sync, project-with-role/*, allow -------------------------------------------------------------------------------- /applications and projects/project - whitelist namespace.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: AppProject 3 | metadata: 4 | name: dev-project 5 | namespace: argocd 6 | spec: 7 | description: Dev Project 8 | sourceRepos: 9 | - '*' 10 | 11 | destinations: 12 | - namespace: ns-1 13 | server: https://kubernetes.default.svc 14 | 15 | clusterResourceWhitelist: 16 | - group: '*' 17 | kind: '*' 18 | 19 | namespaceResourceWhitelist: 20 | - group: '*' 21 | kind: '*' 22 | -------------------------------------------------------------------------------- /applications and projects/project.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: AppProject 3 | metadata: 4 | name: demo-project 5 | namespace: argocd 6 | spec: 7 | description: Demo Project 8 | sourceRepos: 9 | - '*' 10 | 11 | destinations: 12 | - namespace: '*' 13 | server: '*' 14 | 15 | clusterResourceWhitelist: 16 | - group: '*' 17 | kind: '*' 18 | 19 | namespaceResourceWhitelist: 20 | - group: '*' 21 | kind: '*' 22 | -------------------------------------------------------------------------------- /applications and projects/sync-options/application - Fail On Shared Resources.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: demo-shared-resources 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: guestbook-demo-project 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | - FailOnSharedResource=true 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /applications and projects/sync-options/application - No prune.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: no-prune-resources 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: no-prune-resources 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: sync-options/no-prune 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | 22 | 23 | -------------------------------------------------------------------------------- /applications and projects/sync-options/application - Replace.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: replace-resources 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: replace-resources 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: sync-options/replace 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | - Replace=true 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /applications and projects/sync-options/application - Selective Sync.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: selective-sync 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: selective-sync 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: sync-options/selective-sync 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | - ApplyOutOfSyncOnly=true 22 | 23 | 24 | -------------------------------------------------------------------------------- /applications and projects/sync-phases-waves/application - resources hooks.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: sync-phases 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: sync-phases 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: sync-phases 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | 19 | 20 | -------------------------------------------------------------------------------- /applications and projects/sync-phases-waves/application - sync waves.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: sync-waves 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: sync-waves 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: sync-waves 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: master 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | 19 | 20 | -------------------------------------------------------------------------------- /applications and projects/tracking-strategies/application - tracking git commit sha.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: track-commit 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: track-commit 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: 2455bb6 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | 22 | 23 | -------------------------------------------------------------------------------- /applications and projects/tracking-strategies/application - tracking git head.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: track-head 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: track-head 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: HEAD 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | 22 | 23 | -------------------------------------------------------------------------------- /applications and projects/tracking-strategies/application - tracking git tag.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: track-git-tag 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: track-git-tag 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: guestbook 13 | repoURL: "https://github.com/mabusaa/argocd-example-apps.git" 14 | targetRevision: v1 15 | directory: 16 | recurse: true 17 | syncPolicy: 18 | automated: {} 19 | syncOptions: 20 | - CreateNamespace=true 21 | 22 | 23 | -------------------------------------------------------------------------------- /applications and projects/tracking-strategies/application - tracking helm latest version.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: track-helm-latest-version 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: track-helm-latest-version 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | chart: ingress-nginx 13 | repoURL: "https://kubernetes.github.io/ingress-nginx" 14 | targetRevision: '*' 15 | syncPolicy: 16 | automated: {} 17 | syncOptions: 18 | - CreateNamespace=true 19 | 20 | 21 | -------------------------------------------------------------------------------- /applications and projects/tracking-strategies/application - tracking helm range.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: track-helm-range 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: track-helm-range 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | chart: sealed-secrets 13 | repoURL: "https://charts.bitnami.com/bitnami" 14 | targetRevision: 1.* # you can use greater than and smaller than ex: >=3.0.0 <4.1.0 15 | syncPolicy: 16 | automated: {} 17 | syncOptions: 18 | - CreateNamespace=true 19 | 20 | 21 | -------------------------------------------------------------------------------- /applications and projects/webapp-sample-application/webapp application.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: webapp 5 | namespace: argocd 6 | spec: 7 | destination: 8 | namespace: webapp 9 | server: "https://kubernetes.default.svc" 10 | project: default 11 | source: 12 | path: helm/webapp 13 | repoURL: "https://github.com/mabusaa/argocd-course-webapp-config.git" 14 | targetRevision: main 15 | syncPolicy: 16 | automated: {} 17 | syncOptions: 18 | - CreateNamespace=true 19 | 20 | 21 | -------------------------------------------------------------------------------- /argocd-install/overlays/non-production/argocd-namespace.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: argocd -------------------------------------------------------------------------------- /argocd-install/overlays/non-production/config/argocd-cmd-params-cm.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: argocd-cmd-params-cm 5 | labels: 6 | app.kubernetes.io/name: argocd-cmd-params-cm 7 | app.kubernetes.io/part-of: argocd 8 | data: 9 | server.insecure: "true" -------------------------------------------------------------------------------- /argocd-install/overlays/non-production/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - ./argocd-namespace.yaml 5 | - https://raw.githubusercontent.com/argoproj/argo-cd/v2.9.3/manifests/install.yaml 6 | 7 | patches: 8 | - path: ./config/argocd-cmd-params-cm.yaml 9 | -------------------------------------------------------------------------------- /argocd-install/overlays/production/argocd-namespace.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: argocd -------------------------------------------------------------------------------- /argocd-install/overlays/production/config/argocd-cmd-params-cm.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: argocd-cmd-params-cm 5 | labels: 6 | app.kubernetes.io/name: argocd-cmd-params-cm 7 | app.kubernetes.io/part-of: argocd 8 | data: 9 | server.insecure: "true" -------------------------------------------------------------------------------- /argocd-install/overlays/production/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - ./argocd-namespace.yaml 5 | - https://raw.githubusercontent.com/argoproj/argo-cd/v2.9.3/manifests/ha/install.yaml 6 | 7 | patches: 8 | - path: ./config/argocd-cmd-params-cm.yaml 9 | -------------------------------------------------------------------------------- /clusters/local-cluster.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | namespace: argocd 5 | name: local-cluster 6 | labels: 7 | argocd.argoproj.io/secret-type: cluster 8 | environment: "dev" 9 | provider: "local" 10 | non-prod: "true" 11 | type: Opaque 12 | stringData: 13 | name: local-cluster 14 | server: https://kubernetes.default.svc 15 | config: | 16 | { 17 | "tlsClientConfig": { 18 | "insecure": false 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /clusters/staging-digitalocean.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | namespace: argocd 5 | name: staging-digitalocean-ams3-1 6 | labels: 7 | argocd.argoproj.io/secret-type: cluster 8 | environment: "staging" 9 | provider: "digitalocean" 10 | type: Opaque 11 | stringData: 12 | name: staging-digitalocean-ams3-1 13 | server: https://c50189b1-bb18-4a46-b772-b045e0ed4fde.k8s.ondigitalocean.com 14 | config: | 15 | { 16 | "bearerToken": "###", # dont push secrets into git NOTE: use sealed secrets as a solution for secrets in gitops. 17 | "tlsClientConfig": { 18 | "insecure": false, 19 | "caData": "###" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /repos/private-repo-creds-https.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: private-repo-creds-https 5 | namespace: argocd 6 | labels: 7 | argocd.argoproj.io/secret-type: repo-creds 8 | stringData: 9 | type: git 10 | url: https://github.com/mabusaa 11 | password: # password goes here, NOTE: dont push secrets into git, use sealed secrets as a solution for secrets in gitops. 12 | username: my-token 13 | -------------------------------------------------------------------------------- /repos/private-repo-https.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: private-repo-https 5 | namespace: argocd 6 | labels: 7 | argocd.argoproj.io/secret-type: repository 8 | stringData: 9 | type: git 10 | url: https://github.com/mabusaa/argocd-example-apps-private.git 11 | password: # password goes here, NOTE: dont push secrets into git, use sealed secrets as a solution for secrets in gitops. 12 | username: my-token 13 | -------------------------------------------------------------------------------- /repos/private-repo-ssh.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: private-repo-ssh 5 | namespace: argocd 6 | labels: 7 | argocd.argoproj.io/secret-type: repository 8 | stringData: 9 | type: git 10 | url: git@github.com:mabusaa/argocd-example-apps-private.git 11 | sshPrivateKey: | 12 | -----BEGIN OPENSSH PRIVATE KEY----- 13 | # key goes here NOTE: dont push secrets into git, use sealed secrets as a solution for secrets in gitops. 14 | -----END OPENSSH PRIVATE KEY----- 15 | --------------------------------------------------------------------------------