diff --git a/app-of-apps/more-apps/argo-workflows.yml b/app-of-apps/more-apps/argo-workflows.yml index bd43d9c93d..07fee0fb25 100644 --- a/app-of-apps/more-apps/argo-workflows.yml +++ b/app-of-apps/more-apps/argo-workflows.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/more-apps/kubeview.yml b/app-of-apps/more-apps/kubeview.yml index 91cb797c23..c16136ed03 100644 --- a/app-of-apps/more-apps/kubeview.yml +++ b/app-of-apps/more-apps/kubeview.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/my-app-list/argo-rollouts.yml b/app-of-apps/my-app-list/argo-rollouts.yml index 3c2a590b93..52fc2a748a 100644 --- a/app-of-apps/my-app-list/argo-rollouts.yml +++ b/app-of-apps/my-app-list/argo-rollouts.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/my-app-list/cert-manager.yml b/app-of-apps/my-app-list/cert-manager.yml index 972c2a4479..38452556fd 100644 --- a/app-of-apps/my-app-list/cert-manager.yml +++ b/app-of-apps/my-app-list/cert-manager.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/my-app-list/grafana.yml b/app-of-apps/my-app-list/grafana.yml index e08a0cc3b2..c602e5a728 100644 --- a/app-of-apps/my-app-list/grafana.yml +++ b/app-of-apps/my-app-list/grafana.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/my-app-list/linkerd.yml b/app-of-apps/my-app-list/linkerd.yml index de344b0509..8a9b0c5e64 100644 --- a/app-of-apps/my-app-list/linkerd.yml +++ b/app-of-apps/my-app-list/linkerd.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/my-app-list/nginx.yml b/app-of-apps/my-app-list/nginx.yml index f02037db56..afc231816e 100644 --- a/app-of-apps/my-app-list/nginx.yml +++ b/app-of-apps/my-app-list/nginx.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/my-app-list/prometheus.yml b/app-of-apps/my-app-list/prometheus.yml index 488f669b17..1c7608b3d5 100644 --- a/app-of-apps/my-app-list/prometheus.yml +++ b/app-of-apps/my-app-list/prometheus.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/my-app-list/sealed-secrets.yml b/app-of-apps/my-app-list/sealed-secrets.yml index e42e22578d..7b1b2ac1c9 100644 --- a/app-of-apps/my-app-list/sealed-secrets.yml +++ b/app-of-apps/my-app-list/sealed-secrets.yml @@ -13,7 +13,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./app-of-apps/manifests diff --git a/app-of-apps/root-app/my-application.yml b/app-of-apps/root-app/my-application.yml index a5bc9b98c3..f96b7cfd3c 100644 --- a/app-of-apps/root-app/my-application.yml +++ b/app-of-apps/root-app/my-application.yml @@ -2,33 +2,28 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: root-application - # You'll usually want to add your resources to the argocd namespace. namespace: argocd - # Add a this finalizer ONLY if you want these to cascade delete. finalizers: - resources-finalizer.argocd.argoproj.io spec: - # The project the application belongs to. project: default - - # Source of the application manifests - source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git - targetRevision: HEAD - path: ./app-of-apps/my-app-list - - # directory - directory: - recurse: false - # Destination cluster and namespace to deploy the application + # Use 'sources' (plural) instead of 'source' (singular) + sources: + - repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git + targetRevision: HEAD + path: ./app-of-apps/my-app-list + directory: + recurse: false + - repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git + targetRevision: HEAD + path: ./app-of-apps/more-apps + directory: + recurse: false destination: server: https://kubernetes.default.svc namespace: default - - # Sync policy syncPolicy: - automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field. - prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ). - selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ). - allowEmpty: false # Allows deleting all application resources during automatic syncing ( false by default ). - \ No newline at end of file + automated: + prune: true + selfHeal: true + allowEmpty: false diff --git a/application-sets/generators/many-apps.yml b/application-sets/generators/many-apps.yml index 31bbcc9793..d55f36542d 100644 --- a/application-sets/generators/many-apps.yml +++ b/application-sets/generators/many-apps.yml @@ -6,7 +6,7 @@ metadata: spec: generators: - git: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git revision: HEAD directories: - path: application-sets/example-apps/* @@ -19,7 +19,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: '{{path}}' diff --git a/application-sets/generators/single-app-many-times.yml b/application-sets/generators/single-app-many-times.yml index 2a4c107b7f..fea22e8d53 100644 --- a/application-sets/generators/single-app-many-times.yml +++ b/application-sets/generators/single-app-many-times.yml @@ -20,7 +20,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./application-sets/manifests diff --git a/application-sets/generators/single-app-multiple-clusters.yml b/application-sets/generators/single-app-multiple-clusters.yml index db9a363033..933f2a6860 100644 --- a/application-sets/generators/single-app-multiple-clusters.yml +++ b/application-sets/generators/single-app-multiple-clusters.yml @@ -15,7 +15,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./application-sets/manifests diff --git a/application-sets/my-application-sets/many-apps-many-cluster.yml b/application-sets/my-application-sets/many-apps-many-cluster.yml new file mode 100644 index 0000000000..be47aabb81 --- /dev/null +++ b/application-sets/my-application-sets/many-apps-many-cluster.yml @@ -0,0 +1,36 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: cluster-git +spec: + generators: + # matrix 'parent' generator + - matrix: + generators: + # git generator, 'child' #1 + - git: + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git + revision: HEAD + directories: + - path: application-sets/example-apps/* + # cluster generator, 'child' #2 + - clusters: {} + template: + metadata: + name: '{{path.basename}}-{{name}}' + spec: + project: 'default' + source: + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git + targetRevision: HEAD + path: '{{path}}' + # Sync policy + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field. + prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ). + selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ). + destination: + server: '{{server}}' + namespace: '{{path.basename}}' diff --git a/application-sets/my-application-sets/many-apps.yaml b/application-sets/my-application-sets/many-apps.yaml new file mode 100644 index 0000000000..31bbcc9793 --- /dev/null +++ b/application-sets/my-application-sets/many-apps.yaml @@ -0,0 +1,38 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: many-apps-application-set + namespace: argocd +spec: + generators: + - git: + repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + revision: HEAD + directories: + - path: application-sets/example-apps/* + template: + metadata: + name: '{{path.basename}}' + spec: + # The project the application belongs to. + project: default + + # Source of the application manifests + source: + repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + targetRevision: HEAD + path: '{{path}}' + + # Destination cluster and namespace to deploy the application + destination: + server: https://kubernetes.default.svc + namespace: '{{path.basename}}' + + # Sync policy + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field. + prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ). + selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ). + diff --git a/application-sets/my-application-sets/single-app-many-times.yml b/application-sets/my-application-sets/single-app-many-times.yml index 2a4c107b7f..fea22e8d53 100644 --- a/application-sets/my-application-sets/single-app-many-times.yml +++ b/application-sets/my-application-sets/single-app-many-times.yml @@ -20,7 +20,7 @@ spec: # Source of the application manifests source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./application-sets/manifests diff --git a/application-sets/my-application-sets/single-app-multiple-clusters.yaml b/application-sets/my-application-sets/single-app-multiple-clusters.yaml new file mode 100644 index 0000000000..db9a363033 --- /dev/null +++ b/application-sets/my-application-sets/single-app-multiple-clusters.yaml @@ -0,0 +1,34 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: multi-cluster-application-set + namespace: argocd +spec: + generators: + - clusters: {} # Automatically use all clusters defined within Argo CD + template: + metadata: + name: '{{name}}-billing-app' + spec: + # The project the application belongs to. + project: default + + # Source of the application manifests + source: + repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + targetRevision: HEAD + path: ./application-sets/manifests + + # Destination cluster and namespace to deploy the application + destination: + server: '{{server}}' + namespace: billing + + # Sync policy + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field. + prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ). + selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ). + diff --git a/custom-diff/applications/external-helm-app.yml b/custom-diff/applications/external-helm-app.yml index d7b727ff92..372a2999f1 100644 --- a/custom-diff/applications/external-helm-app.yml +++ b/custom-diff/applications/external-helm-app.yml @@ -9,7 +9,7 @@ spec: project: default source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./custom-diff/02-external-app diff --git a/custom-diff/applications/with-hpa.yml b/custom-diff/applications/with-hpa.yml index d5fd00b34d..9d6c53eb65 100644 --- a/custom-diff/applications/with-hpa.yml +++ b/custom-diff/applications/with-hpa.yml @@ -9,7 +9,7 @@ spec: project: default source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./custom-diff/01-with-hpa diff --git a/environment-promotion/envs/prod/settings.yml b/environment-promotion/envs/prod/settings.yml index 2b94ef8ad9..400ffc97fb 100644 --- a/environment-promotion/envs/prod/settings.yml +++ b/environment-promotion/envs/prod/settings.yml @@ -10,7 +10,7 @@ spec: - name: webserver-simple env: - name: UI_THEME - value: "dark" + value: "light" - name: CACHE_SIZE value: "1024kb" - name: PAGE_LIMIT @@ -18,4 +18,4 @@ spec: - name: SORTING value: "ascending" - name: N_BUCKETS - value: "12" + value: "24" \ No newline at end of file diff --git a/environment-promotion/envs/prod/version.yml b/environment-promotion/envs/prod/version.yml index 51bc5350da..c088376339 100644 --- a/environment-promotion/envs/prod/version.yml +++ b/environment-promotion/envs/prod/version.yml @@ -8,4 +8,4 @@ spec: spec: containers: - name: webserver-simple - image: docker.io/kostiscodefresh/simple-env-app:1.0 + image: docker.io/kostiscodefresh/simple-env-app:3.0 diff --git a/environment-promotion/envs/qa/settings.yml b/environment-promotion/envs/qa/settings.yml index 738a5bec3a..400ffc97fb 100644 --- a/environment-promotion/envs/qa/settings.yml +++ b/environment-promotion/envs/qa/settings.yml @@ -12,10 +12,10 @@ spec: - name: UI_THEME value: "light" - name: CACHE_SIZE - value: "2048kb" + value: "1024kb" - name: PAGE_LIMIT value: "25" - name: SORTING value: "ascending" - name: N_BUCKETS - value: "42" \ No newline at end of file + value: "24" \ No newline at end of file diff --git a/environment-promotion/envs/staging/version.yml b/environment-promotion/envs/staging/version.yml index 0423d0fa0a..c088376339 100644 --- a/environment-promotion/envs/staging/version.yml +++ b/environment-promotion/envs/staging/version.yml @@ -8,4 +8,4 @@ spec: spec: containers: - name: webserver-simple - image: docker.io/kostiscodefresh/simple-env-app:2.0 + image: docker.io/kostiscodefresh/simple-env-app:3.0 diff --git a/image-updater/applications/always-latest.yml b/image-updater/applications/always-latest.yml index 6c53b84d77..2074945bd4 100644 --- a/image-updater/applications/always-latest.yml +++ b/image-updater/applications/always-latest.yml @@ -4,13 +4,13 @@ metadata: name: always-latest01 namespace: argocd annotations: - argocd-image-updater.argoproj.io/image-list: example=ghcr.io/codefresh-contrib/gitops-cert-level-2-examples + argocd-image-updater.argoproj.io/image-list: example=ghcr.io/it-rubenrebelo/gitops-cert-level-2-examples argocd-image-updater.argoproj.io/example.update-strategy: latest spec: project: default source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./image-updater/example-app/envs/qa/ diff --git a/image-updater/applications/semver.yml b/image-updater/applications/semver.yml index 6801294bb3..6564ccdfc6 100644 --- a/image-updater/applications/semver.yml +++ b/image-updater/applications/semver.yml @@ -4,12 +4,12 @@ metadata: name: follow-semver02 namespace: argocd annotations: - argocd-image-updater.argoproj.io/image-list: ghcr.io/codefresh-contrib/gitops-cert-level-2-examples:~1 + argocd-image-updater.argoproj.io/image-list: ghcr.io/it-rubenrebelo/gitops-cert-level-2-examples:~1 spec: project: default source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./image-updater/example-app/envs/staging/ diff --git a/image-updater/example-app/base/deployment.yml b/image-updater/example-app/base/deployment.yml index 59e85e3d0f..8b276ddf4e 100644 --- a/image-updater/example-app/base/deployment.yml +++ b/image-updater/example-app/base/deployment.yml @@ -18,7 +18,7 @@ spec: containers: - name: webserver-simple imagePullPolicy: Always - image: ghcr.io/codefresh-contrib/gitops-cert-level-2-examples:latest + image: ghcr.io/it-rubenrebelo/gitops-cert-level-2-examples:latest ports: - containerPort: 8080 diff --git a/image-updater/example-app/envs/qa/version.yml b/image-updater/example-app/envs/qa/version.yml index afaa590368..f0f738c2ea 100644 --- a/image-updater/example-app/envs/qa/version.yml +++ b/image-updater/example-app/envs/qa/version.yml @@ -8,4 +8,4 @@ spec: spec: containers: - name: webserver-simple - image: ghcr.io/codefresh-contrib/gitops-cert-level-2-examples:1.0 + image: ghcr.io/it-rubenrebelo/gitops-cert-level-2-examples:1.0 diff --git a/image-updater/example-app/envs/staging/version.yml b/image-updater/example-app/envs/staging/version.yml index afaa590368..f0f738c2ea 100644 --- a/image-updater/example-app/envs/staging/version.yml +++ b/image-updater/example-app/envs/staging/version.yml @@ -8,4 +8,4 @@ spec: spec: containers: - name: webserver-simple - image: ghcr.io/codefresh-contrib/gitops-cert-level-2-examples:1.0 + image: ghcr.io/it-rubenrebelo/gitops-cert-level-2-examples:1.0 diff --git a/image-updater/source-code/codefresh.yml b/image-updater/source-code/codefresh.yml index 53f8046e0f..e0aaa14698 100644 --- a/image-updater/source-code/codefresh.yml +++ b/image-updater/source-code/codefresh.yml @@ -11,7 +11,7 @@ steps: clone: title: "Cloning repository" type: "git-clone" - repo: "codefresh-contrib/gitops-certification-examples" + repo: "it-rubenrebelo/gitops-certification-examples" revision: "main" stage: "clone" diff --git a/image-updater/source-code/go.mod b/image-updater/source-code/go.mod index 91a2d7ba98..7c9a735d29 100644 --- a/image-updater/source-code/go.mod +++ b/image-updater/source-code/go.mod @@ -1,3 +1,3 @@ -module github.com/codefresh-contrib/gitops-certification-examples/simple-web-app +module github.com/it-rubenrebelo/gitops-certification-examples/simple-web-app go 1.15 diff --git a/notifications/webhook-setup/simple-notificationa-app.yaml b/notifications/webhook-setup/simple-notificationa-app.yaml index 7acceebd45..11279c436c 100644 --- a/notifications/webhook-setup/simple-notificationa-app.yaml +++ b/notifications/webhook-setup/simple-notificationa-app.yaml @@ -11,7 +11,7 @@ spec: project: default source: path: ./notifications/dummy-app - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples targetRevision: HEAD syncPolicy: syncOptions: diff --git a/solutions/application-sets/generators/many-apps-many-clusters.yml b/solutions/application-sets/generators/many-apps-many-clusters.yml index 8db63aaf2e..8779f246d7 100644 --- a/solutions/application-sets/generators/many-apps-many-clusters.yml +++ b/solutions/application-sets/generators/many-apps-many-clusters.yml @@ -9,7 +9,7 @@ spec: generators: # git generator, 'child' #1 - git: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git revision: HEAD directories: - path: application-sets/example-apps/* @@ -21,7 +21,7 @@ spec: spec: project: default source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: '{{path}}' destination: diff --git a/solutions/custom-diff/applications/external-helm-app.yml b/solutions/custom-diff/applications/external-helm-app.yml index b938f77236..d5af277e46 100644 --- a/solutions/custom-diff/applications/external-helm-app.yml +++ b/solutions/custom-diff/applications/external-helm-app.yml @@ -9,7 +9,7 @@ spec: project: default source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./custom-diff/02-external-app diff --git a/solutions/custom-diff/applications/with-hpa.yml b/solutions/custom-diff/applications/with-hpa.yml index c4b0ae8ea1..cb10dfe756 100644 --- a/solutions/custom-diff/applications/with-hpa.yml +++ b/solutions/custom-diff/applications/with-hpa.yml @@ -8,7 +8,7 @@ metadata: spec: project: default source: - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-2-examples.git + repoURL: https://github.com/it-rubenrebelo/gitops-cert-level-2-examples.git targetRevision: HEAD path: ./custom-diff/01-with-hpa