├── README.md ├── application-migration └── my-example-appset.yml ├── application-ordering ├── apps │ ├── example-api.yml │ ├── example-db.yml │ └── example-frontend.yml ├── manifests │ ├── api │ │ ├── deployment.yml │ │ └── service.yml │ ├── db │ │ ├── Chart.yaml │ │ └── values.yaml │ └── frontend │ │ ├── deployment.yml │ │ └── service.yml └── patch-argocd-cm.yaml ├── argocd-apps-structure ├── apps │ ├── billing │ │ ├── base │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ └── service.yml │ │ └── envs │ │ │ ├── prod-eu │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── replicas.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ │ │ └── prod-us │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── replicas.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ ├── fake-invoices │ │ ├── base │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ └── service.yml │ │ └── envs │ │ │ └── qa │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ ├── invoices │ │ ├── base │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ └── service.yml │ │ └── envs │ │ │ ├── prod-eu │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── replicas.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ │ │ ├── prod-us │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── replicas.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ │ │ ├── qa │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ │ │ └── staging │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── replicas.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ ├── orders │ │ ├── base │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ └── service.yml │ │ └── envs │ │ │ ├── prod-us │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── replicas.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ │ │ ├── qa │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ │ │ └── staging │ │ │ ├── deployment.yml │ │ │ ├── kustomization.yml │ │ │ ├── replicas.yml │ │ │ ├── settings.yml │ │ │ └── version.yml │ └── payments │ │ ├── base │ │ ├── deployment.yml │ │ ├── kustomization.yml │ │ └── service.yml │ │ └── envs │ │ ├── prod-eu │ │ ├── deployment.yml │ │ ├── kustomization.yml │ │ ├── replicas.yml │ │ ├── settings.yml │ │ └── version.yml │ │ └── prod-us │ │ ├── deployment.yml │ │ ├── kustomization.yml │ │ ├── replicas.yml │ │ ├── settings.yml │ │ └── version.yml ├── appsets │ ├── my-prod-appset.yml │ ├── my-qa-appset.yml │ └── my-staging-appset.yml └── root-argocd-app.yml ├── external-secrets ├── app │ ├── deployment.yml │ ├── external-secret-db.yml │ └── service.yml └── vault-integration │ └── secretstore.yml ├── helm-multi-source ├── 01-single-app │ └── staging-eu-app.yaml ├── 02-appset │ └── all-my-envs.yaml ├── 03-external-repo │ ├── all-my-envs-appset-with-version.yaml │ └── env-config │ │ ├── integration │ │ ├── gpu │ │ │ └── config.json │ │ └── non-gpu │ │ │ └── config.json │ │ ├── prod │ │ ├── eu │ │ │ └── config.json │ │ └── us │ │ │ └── config.json │ │ ├── qa │ │ └── config.json │ │ └── staging │ │ ├── asia │ │ └── config.json │ │ ├── eu │ │ └── config.json │ │ └── us │ │ └── config.json ├── my-chart │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── deployment.yaml │ │ └── service.yaml │ └── values.yaml └── my-values │ ├── app-version │ ├── prod-values.yaml │ ├── qa-values.yaml │ └── staging-values.yaml │ ├── common-values.yaml │ ├── env-type │ ├── non-prod-values.yaml │ └── prod-values.yaml │ ├── envs │ ├── integration-gpu-values.yaml │ ├── integration-non-gpu-values.yaml │ ├── prod-eu-values.yaml │ ├── prod-us-values.yaml │ ├── qa-values.yaml │ ├── staging-asia-values.yaml │ ├── staging-eu-values.yaml │ └── staging-us-values.yaml │ └── regions │ ├── asia-values.yaml │ ├── eu-values.yaml │ └── us-values.yaml ├── preview-environments ├── kustomize-preview-app │ ├── deployment.yml │ ├── kustomization.yaml │ └── service.yml └── pr-generator │ └── pr-generator.yml ├── rollout-configmaps ├── with-generator │ ├── example-rollout.yml │ ├── kustomization.yml │ ├── service-active.yml │ └── service-preview.yml ├── with-smart-generator │ ├── example-rollout.yml │ ├── kustomization.yml │ ├── service-active.yml │ └── service-preview.yml └── without-generator │ ├── example-rollout.yml │ ├── my-settings.yml │ ├── service-active.yml │ └── service-preview.yml ├── rollout-multiple ├── legacy │ ├── backend-active.yml │ ├── backend-preview.yml │ ├── frontend-active.yml │ ├── frontend-preview.yml │ ├── rollout-be.yml │ └── rollout-fe.yml └── modern │ ├── backend-active.yml │ ├── backend-preview.yml │ ├── frontend-active.yml │ ├── frontend-preview.yml │ ├── frontend-settings.yml │ ├── rollout-be.yml │ └── rollout-fe.yml ├── rollout-workers ├── naive-rollout │ ├── config.yml │ ├── worker-active.yml │ ├── worker-preview.yml │ └── worker.yml ├── queue │ ├── rabbitmq-service.yml │ └── rabbitmq.yml ├── smart-rollout │ ├── worker-active.yml │ ├── worker-preview.yml │ └── worker.yml └── tester │ ├── tester-deployment.yml │ └── tester-service.yml ├── shared-track-resources ├── argo-rollouts │ └── install.yaml ├── argocd-noauth │ ├── argocd-nodeport-service.yml │ └── install.yaml └── vault-install │ └── vault-nodeport.yml └── solutions └── helm-multi-source ├── after-promotion.yaml ├── all-my-envs-with-helm-repo.yaml ├── all-my-envs.yaml └── prod-us-app.yaml /README.md: -------------------------------------------------------------------------------- 1 | Codefresh GitOps Certification examples - Level 3 - GitOps Enterprise 2 | 3 | This repository contains examples for the ArgoCD/GitOps certification workshops (Level 3) 4 | 5 | Take the certification yourself at [https://codefresh.io/courses/get-gitops-certified/](https://learning.codefresh.io/) 6 | -------------------------------------------------------------------------------- /application-migration/my-example-appset.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: my-example-appset 5 | namespace: argocd 6 | spec: 7 | # syncPolicy: 8 | # preserveResourcesOnDeletion: true 9 | goTemplate: true 10 | goTemplateOptions: ["missingkey=error"] 11 | generators: 12 | - git: 13 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 14 | revision: HEAD 15 | directories: 16 | - path: argocd-apps-structure/apps/*/envs/qa 17 | template: 18 | metadata: 19 | name: '{{index .path.segments 2}}-{{index .path.segments 4}}' 20 | spec: 21 | # The project the application belongs to. 22 | project: default 23 | 24 | # Source of the application manifests 25 | source: 26 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 27 | targetRevision: HEAD 28 | path: '{{.path.path}}' 29 | 30 | # Destination cluster and namespace to deploy the application 31 | destination: 32 | name: cluster-2 33 | namespace: '{{index .path.segments 2}}-{{index .path.segments 4}}' 34 | 35 | # Sync policy 36 | syncPolicy: 37 | syncOptions: 38 | - CreateNamespace=true 39 | 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. 40 | 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 ). 41 | 42 | -------------------------------------------------------------------------------- /application-ordering/apps/example-api.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: my-api 5 | namespace: argocd 6 | annotations: 7 | argocd.argoproj.io/sync-wave: "2" 8 | finalizers: 9 | - resources-finalizer.argocd.argoproj.io 10 | spec: 11 | project: default 12 | 13 | source: 14 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 15 | targetRevision: HEAD 16 | path: ./application-ordering/manifests/api 17 | 18 | destination: 19 | server: https://kubernetes.default.svc 20 | namespace: my-api 21 | 22 | # Sync policy 23 | syncPolicy: 24 | syncOptions: 25 | - CreateNamespace=true 26 | automated: 27 | prune: true 28 | selfHeal: true 29 | 30 | -------------------------------------------------------------------------------- /application-ordering/apps/example-db.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: my-db 5 | namespace: argocd 6 | annotations: 7 | argocd.argoproj.io/sync-wave: "1" 8 | finalizers: 9 | - resources-finalizer.argocd.argoproj.io 10 | spec: 11 | project: default 12 | 13 | source: 14 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 15 | targetRevision: HEAD 16 | path: ./application-ordering/manifests/db 17 | 18 | destination: 19 | server: https://kubernetes.default.svc 20 | namespace: my-db 21 | 22 | # Sync policy 23 | syncPolicy: 24 | syncOptions: 25 | - CreateNamespace=true 26 | automated: 27 | prune: true 28 | selfHeal: true 29 | 30 | -------------------------------------------------------------------------------- /application-ordering/apps/example-frontend.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: my-frontend 5 | namespace: argocd 6 | annotations: 7 | argocd.argoproj.io/sync-wave: "3" 8 | finalizers: 9 | - resources-finalizer.argocd.argoproj.io 10 | spec: 11 | project: default 12 | 13 | source: 14 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 15 | targetRevision: HEAD 16 | path: ./application-ordering/manifests/frontend 17 | 18 | destination: 19 | server: https://kubernetes.default.svc 20 | namespace: my-frontend 21 | 22 | # Sync policy 23 | syncPolicy: 24 | syncOptions: 25 | - CreateNamespace=true 26 | automated: 27 | prune: true 28 | selfHeal: true 29 | 30 | -------------------------------------------------------------------------------- /application-ordering/manifests/api/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 1 8 | selector: 9 | matchLabels: 10 | app: trivial-go-web-app 11 | template: 12 | metadata: 13 | labels: 14 | app: trivial-go-web-app 15 | spec: 16 | containers: 17 | - name: webserver-simple 18 | image: docker.io/kostiscodefresh/simple-env-app:1.0 19 | ports: 20 | - containerPort: 8080 21 | livenessProbe: 22 | httpGet: 23 | path: /health/live 24 | port: 8080 25 | readinessProbe: 26 | httpGet: 27 | path: /health/ready 28 | port: 8080 -------------------------------------------------------------------------------- /application-ordering/manifests/api/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: trivial-go-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 -------------------------------------------------------------------------------- /application-ordering/manifests/db/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: golist-db 3 | type: application 4 | version: 1.0.0 5 | appVersion: "1.0.0" 6 | dependencies: 7 | - name: mariadb 8 | version: 11.1.0 9 | repository: https://charts.bitnami.com/bitnami -------------------------------------------------------------------------------- /application-ordering/manifests/db/values.yaml: -------------------------------------------------------------------------------- 1 | mariadb: 2 | architecture: "standalone" 3 | auth: 4 | database: "demo" 5 | username: "demo" 6 | password: "demo" -------------------------------------------------------------------------------- /application-ordering/manifests/frontend/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 1 8 | selector: 9 | matchLabels: 10 | app: trivial-go-web-app 11 | template: 12 | metadata: 13 | labels: 14 | app: trivial-go-web-app 15 | spec: 16 | containers: 17 | - name: webserver-simple 18 | image: docker.io/kostiscodefresh/interest:latest 19 | ports: 20 | - containerPort: 8080 21 | livenessProbe: 22 | httpGet: 23 | path: /health/live 24 | port: 8080 25 | readinessProbe: 26 | httpGet: 27 | path: /health/ready 28 | port: 8080 -------------------------------------------------------------------------------- /application-ordering/manifests/frontend/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: trivial-go-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 -------------------------------------------------------------------------------- /application-ordering/patch-argocd-cm.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | resource.customizations.health.argoproj.io_Application: | 3 | hs = {} 4 | hs.status = "Progressing" 5 | hs.message = "" 6 | if obj.status ~= nil then 7 | if obj.status.health ~= nil then 8 | hs.status = obj.status.health.status 9 | if obj.status.health.message ~= nil then 10 | hs.message = obj.status.health.message 11 | end 12 | end 13 | end 14 | return hs 15 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/base/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | annotations: 7 | codefresh.io/app: simple-go-app 8 | spec: 9 | replicas: 2 10 | selector: 11 | matchLabels: 12 | app: trivial-go-web-app 13 | template: 14 | metadata: 15 | labels: 16 | app: trivial-go-web-app 17 | spec: 18 | containers: 19 | - name: webserver-simple 20 | imagePullPolicy: Always 21 | image: docker.io/kostiscodefresh/simple-env-app:1.0 22 | ports: 23 | - containerPort: 8080 24 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/base/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - deployment.yml 6 | - service.yml -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/base/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: trivial-go-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-eu/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "prod-eu" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-eu/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | patchesStrategicMerge: 8 | - deployment.yml 9 | - version.yml 10 | - replicas.yml 11 | - settings.yml 12 | 13 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-eu/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 8 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-eu/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "dark" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-eu/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:3.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-us/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "prod-us" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-us/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | 8 | patchesStrategicMerge: 9 | - deployment.yml 10 | - version.yml 11 | - replicas.yml 12 | - settings.yml 13 | 14 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-us/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 10 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-us/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "dark" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/billing/envs/prod-us/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:2.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/fake-invoices/base/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | annotations: 7 | codefresh.io/app: simple-go-app 8 | spec: 9 | replicas: 2 10 | selector: 11 | matchLabels: 12 | app: trivial-go-web-app 13 | template: 14 | metadata: 15 | labels: 16 | app: trivial-go-web-app 17 | spec: 18 | containers: 19 | - name: webserver-simple 20 | imagePullPolicy: Always 21 | image: docker.io/kostiscodefresh/simple-env-app:1.0 22 | ports: 23 | - containerPort: 8080 24 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/fake-invoices/base/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - deployment.yml 6 | - service.yml -------------------------------------------------------------------------------- /argocd-apps-structure/apps/fake-invoices/base/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: trivial-go-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/fake-invoices/envs/qa/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "qa" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/fake-invoices/envs/qa/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | 8 | patchesStrategicMerge: 9 | - deployment.yml 10 | - version.yml 11 | - settings.yml 12 | 13 | 14 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/fake-invoices/envs/qa/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "light" 14 | - name: CACHE_SIZE 15 | value: "2048kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/fake-invoices/envs/qa/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:1.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/base/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | annotations: 7 | codefresh.io/app: simple-go-app 8 | spec: 9 | replicas: 2 10 | selector: 11 | matchLabels: 12 | app: trivial-go-web-app 13 | template: 14 | metadata: 15 | labels: 16 | app: trivial-go-web-app 17 | spec: 18 | containers: 19 | - name: webserver-simple 20 | imagePullPolicy: Always 21 | image: docker.io/kostiscodefresh/simple-env-app:1.0 22 | ports: 23 | - containerPort: 8080 24 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/base/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - deployment.yml 6 | - service.yml -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/base/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: trivial-go-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-eu/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "prod-eu" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-eu/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | patchesStrategicMerge: 8 | - deployment.yml 9 | - version.yml 10 | - replicas.yml 11 | - settings.yml 12 | 13 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-eu/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 8 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-eu/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "dark" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-eu/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:3.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-us/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "prod-us" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-us/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | 8 | patchesStrategicMerge: 9 | - deployment.yml 10 | - version.yml 11 | - replicas.yml 12 | - settings.yml 13 | 14 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-us/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 10 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-us/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "dark" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/prod-us/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:2.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/qa/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "qa" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/qa/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | 5 | resources: 6 | - ../../base 7 | 8 | 9 | patchesStrategicMerge: 10 | - deployment.yml 11 | - version.yml 12 | - settings.yml 13 | 14 | 15 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/qa/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "light" 14 | - name: CACHE_SIZE 15 | value: "2048kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/qa/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:1.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/staging/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "staging-us" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/staging/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | 8 | patchesStrategicMerge: 9 | - deployment.yml 10 | - version.yml 11 | - replicas.yml 12 | - settings.yml 13 | 14 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/staging/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 3 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/staging/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "light" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "24" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/invoices/envs/staging/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:2.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/base/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | annotations: 7 | codefresh.io/app: simple-go-app 8 | spec: 9 | replicas: 2 10 | selector: 11 | matchLabels: 12 | app: trivial-go-web-app 13 | template: 14 | metadata: 15 | labels: 16 | app: trivial-go-web-app 17 | spec: 18 | containers: 19 | - name: webserver-simple 20 | imagePullPolicy: Always 21 | image: docker.io/kostiscodefresh/simple-env-app:1.0 22 | ports: 23 | - containerPort: 8080 24 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/base/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - deployment.yml 6 | - service.yml -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/base/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: trivial-go-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/prod-us/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "prod-us" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/prod-us/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | 8 | patchesStrategicMerge: 9 | - deployment.yml 10 | - version.yml 11 | - replicas.yml 12 | - settings.yml 13 | 14 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/prod-us/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 10 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/prod-us/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "dark" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/prod-us/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:2.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/qa/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "qa" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/qa/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | 8 | patchesStrategicMerge: 9 | - deployment.yml 10 | - version.yml 11 | - settings.yml 12 | 13 | 14 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/qa/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "light" 14 | - name: CACHE_SIZE 15 | value: "2048kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/qa/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:1.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/staging/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "staging-us" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/staging/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | 8 | patchesStrategicMerge: 9 | - deployment.yml 10 | - version.yml 11 | - replicas.yml 12 | - settings.yml 13 | 14 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/staging/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 3 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/staging/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "light" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "24" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/orders/envs/staging/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:2.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/base/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | annotations: 7 | codefresh.io/app: simple-go-app 8 | spec: 9 | replicas: 2 10 | selector: 11 | matchLabels: 12 | app: trivial-go-web-app 13 | template: 14 | metadata: 15 | labels: 16 | app: trivial-go-web-app 17 | spec: 18 | containers: 19 | - name: webserver-simple 20 | imagePullPolicy: Always 21 | image: docker.io/kostiscodefresh/simple-env-app:1.0 22 | ports: 23 | - containerPort: 8080 24 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/base/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - deployment.yml 6 | - service.yml -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/base/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: trivial-go-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-eu/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "prod-eu" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-eu/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | patchesStrategicMerge: 8 | - deployment.yml 9 | - version.yml 10 | - replicas.yml 11 | - settings.yml 12 | 13 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-eu/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 8 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-eu/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "dark" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-eu/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:3.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-us/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: ENV 13 | value: "prod-us" 14 | - name: GPU_ENABLED 15 | value: "1" 16 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-us/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../base 6 | 7 | 8 | patchesStrategicMerge: 9 | - deployment.yml 10 | - version.yml 11 | - replicas.yml 12 | - settings.yml 13 | 14 | -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-us/replicas.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 10 -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-us/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | env: 12 | - name: UI_THEME 13 | value: "dark" 14 | - name: CACHE_SIZE 15 | value: "1024kb" 16 | - name: PAGE_LIMIT 17 | value: "25" 18 | - name: SORTING 19 | value: "ascending" 20 | - name: N_BUCKETS 21 | value: "42" -------------------------------------------------------------------------------- /argocd-apps-structure/apps/payments/envs/prod-us/version.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: webserver-simple 11 | image: docker.io/kostiscodefresh/simple-env-app:2.0 12 | -------------------------------------------------------------------------------- /argocd-apps-structure/appsets/my-prod-appset.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: my-prod-appset 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - git: 11 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 12 | revision: HEAD 13 | directories: 14 | - path: argocd-apps-structure/apps/*/envs/prod-us 15 | - path: argocd-apps-structure/apps/*/envs/prod-eu 16 | template: 17 | metadata: 18 | name: '{{index .path.segments 2}}-{{index .path.segments 4}}' 19 | spec: 20 | # The project the application belongs to. 21 | project: default 22 | 23 | # Source of the application manifests 24 | source: 25 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 26 | targetRevision: HEAD 27 | path: '{{.path.path}}' 28 | 29 | # Destination cluster and namespace to deploy the application 30 | destination: 31 | server: https://kubernetes.default.svc 32 | namespace: '{{index .path.segments 2}}-{{index .path.segments 4}}' 33 | 34 | # Sync policy 35 | syncPolicy: 36 | syncOptions: 37 | - CreateNamespace=true 38 | 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. 39 | prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ). 40 | 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 ). 41 | 42 | -------------------------------------------------------------------------------- /argocd-apps-structure/appsets/my-qa-appset.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: my-qa-appset 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - git: 11 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 12 | revision: HEAD 13 | directories: 14 | - path: argocd-apps-structure/apps/*/envs/qa 15 | template: 16 | metadata: 17 | name: '{{index .path.segments 2}}-{{index .path.segments 4}}' 18 | spec: 19 | # The project the application belongs to. 20 | project: default 21 | 22 | # Source of the application manifests 23 | source: 24 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 25 | targetRevision: HEAD 26 | path: '{{.path.path}}' 27 | 28 | # Destination cluster and namespace to deploy the application 29 | destination: 30 | server: https://kubernetes.default.svc 31 | namespace: '{{index .path.segments 2}}-{{index .path.segments 4}}' 32 | 33 | # Sync policy 34 | syncPolicy: 35 | syncOptions: 36 | - CreateNamespace=true 37 | 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. 38 | prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ). 39 | 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 ). 40 | 41 | -------------------------------------------------------------------------------- /argocd-apps-structure/appsets/my-staging-appset.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: my-staging-appset 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - git: 11 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 12 | revision: HEAD 13 | directories: 14 | - path: argocd-apps-structure/apps/*/envs/staging 15 | template: 16 | metadata: 17 | name: '{{index .path.segments 2}}-{{index .path.segments 4}}' 18 | spec: 19 | # The project the application belongs to. 20 | project: default 21 | 22 | # Source of the application manifests 23 | source: 24 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 25 | targetRevision: HEAD 26 | path: '{{.path.path}}' 27 | 28 | # Destination cluster and namespace to deploy the application 29 | destination: 30 | server: https://kubernetes.default.svc 31 | namespace: '{{index .path.segments 2}}-{{index .path.segments 4}}' 32 | 33 | # Sync policy 34 | syncPolicy: 35 | syncOptions: 36 | - CreateNamespace=true 37 | 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. 38 | prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ). 39 | 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 ). 40 | 41 | -------------------------------------------------------------------------------- /argocd-apps-structure/root-argocd-app.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: all-apps 5 | namespace: argocd 6 | spec: 7 | project: default 8 | source: 9 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 10 | targetRevision: HEAD 11 | path: argocd-apps-structure/appsets 12 | destination: 13 | server: https://kubernetes.default.svc 14 | namespace: argocd 15 | syncPolicy: 16 | syncOptions: 17 | - CreateNamespace=true 18 | automated: 19 | prune: true 20 | selfHeal: true -------------------------------------------------------------------------------- /external-secrets/app/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: gitops-secrets-deploy 6 | spec: 7 | replicas: 1 8 | selector: 9 | matchLabels: 10 | app: gitops-secrets-app 11 | template: 12 | metadata: 13 | labels: 14 | app: gitops-secrets-app 15 | spec: 16 | containers: 17 | - name: gitops-secrets-app 18 | image: docker.io/kostiscodefresh/simple-secret-app:latest 19 | imagePullPolicy: Always 20 | ports: 21 | - containerPort: 8080 22 | volumeMounts: 23 | - name: mysql 24 | mountPath: "/secrets" 25 | readOnly: true 26 | livenessProbe: 27 | httpGet: 28 | path: /health/live 29 | port: 8080 30 | readinessProbe: 31 | httpGet: 32 | path: /health/ready 33 | port: 8080 34 | volumes: 35 | - name: mysql 36 | secret: 37 | secretName: mysql-credentials 38 | 39 | -------------------------------------------------------------------------------- /external-secrets/app/external-secret-db.yml: -------------------------------------------------------------------------------- 1 | apiVersion: external-secrets.io/v1beta1 2 | kind: ExternalSecret 3 | metadata: 4 | name: my-db-credentials 5 | spec: 6 | refreshInterval: "15s" 7 | secretStoreRef: 8 | name: vault-backend 9 | kind: ClusterSecretStore 10 | target: 11 | name: mysql-credentials 12 | template: 13 | engineVersion: v2 14 | data: 15 | credentials: | 16 | db_con="{{ .db_url }}" 17 | db_user="{{ .db_username }}" 18 | db_password="{{ .db_password }}" 19 | 20 | data: 21 | - secretKey: db_url 22 | remoteRef: 23 | key: mysql_credentials 24 | property: url 25 | - secretKey: db_username 26 | remoteRef: 27 | key: mysql_credentials 28 | property: username 29 | - secretKey: db_password 30 | remoteRef: 31 | key: mysql_credentials 32 | property: password 33 | -------------------------------------------------------------------------------- /external-secrets/app/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: gitops-secrets-service 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: gitops-secrets-app 9 | ports: 10 | - nodePort: 31000 11 | protocol: TCP 12 | port: 8080 13 | -------------------------------------------------------------------------------- /external-secrets/vault-integration/secretstore.yml: -------------------------------------------------------------------------------- 1 | apiVersion: external-secrets.io/v1beta1 2 | kind: ClusterSecretStore 3 | metadata: 4 | name: vault-backend 5 | spec: 6 | provider: 7 | vault: 8 | server: "http://vault.vault:8200" 9 | path: "secret" 10 | # Version is the Vault KV secret engine version. 11 | # This can be either "v1" or "v2", defaults to "v2" 12 | version: "v2" 13 | auth: 14 | # points to a secret that contains a vault token 15 | # https://www.vaultproject.io/docs/auth/token 16 | kubernetes: 17 | mountPath: "kubernetes" 18 | role: "demo" 19 | -------------------------------------------------------------------------------- /helm-multi-source/01-single-app/staging-eu-app.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: staging-eu-app 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | project: default 10 | destination: 11 | server: https://kubernetes.default.svc 12 | namespace: staging-eu 13 | sources: 14 | - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 15 | path: helm-multi-source/my-chart 16 | targetRevision: HEAD 17 | helm: 18 | valueFiles: 19 | - $values/helm-multi-source/my-values/common-values.yaml 20 | - $values/helm-multi-source/my-values/app-version/staging-values.yaml 21 | - $values/helm-multi-source/my-values/env-type/non-prod-values.yaml 22 | - $values/helm-multi-source/my-values/regions/eu-values.yaml 23 | - $values/helm-multi-source/my-values/envs/staging-eu-values.yaml 24 | - repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git' 25 | targetRevision: HEAD 26 | ref: values 27 | syncPolicy: 28 | syncOptions: 29 | - CreateNamespace=true 30 | automated: 31 | prune: true 32 | selfHeal: true 33 | -------------------------------------------------------------------------------- /helm-multi-source/02-appset/all-my-envs.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: all-my-envs 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - list: 11 | elements: 12 | - env: qa 13 | region: us 14 | type: non-prod 15 | version: qa 16 | - env: staging-asia 17 | region: asia 18 | type: non-prod 19 | version: staging 20 | - env: staging-eu 21 | region: eu 22 | type: non-prod 23 | version: staging 24 | - env: staging-us 25 | region: us 26 | type: non-prod 27 | version: staging 28 | - env: prod-eu 29 | region: eu 30 | type: prod 31 | version: prod 32 | - env: prod-us 33 | region: us 34 | type: prod 35 | version: prod 36 | template: 37 | metadata: 38 | name: '{{.env}}' 39 | spec: 40 | # The project the application belongs to. 41 | project: default 42 | 43 | sources: 44 | - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 45 | path: helm-multi-source/my-chart 46 | targetRevision: HEAD 47 | helm: 48 | valueFiles: 49 | - $values/helm-multi-source/my-values/common-values.yaml 50 | - $values/helm-multi-source/my-values/app-version/{{.version}}-values.yaml 51 | - $values/helm-multi-source/my-values/env-type/{{.type}}-values.yaml 52 | - $values/helm-multi-source/my-values/regions/{{.region}}-values.yaml 53 | - $values/helm-multi-source/my-values/envs/{{.env}}-values.yaml 54 | - repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git' 55 | targetRevision: HEAD 56 | ref: values 57 | 58 | # Destination cluster and namespace to deploy the application 59 | destination: 60 | server: https://kubernetes.default.svc 61 | namespace: '{{.env}}' 62 | 63 | # Sync policy 64 | syncPolicy: 65 | syncOptions: 66 | - CreateNamespace=true 67 | automated: 68 | prune: true 69 | selfHeal: true 70 | 71 | -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/all-my-envs-appset-with-version.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: all-my-envs 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - git: 11 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 12 | revision: HEAD 13 | files: 14 | - path: "helm-multi-source/03-external-repo/env-config/**/config.json" 15 | template: 16 | metadata: 17 | name: '{{.env}}' 18 | spec: 19 | # The project the application belongs to. 20 | project: default 21 | 22 | sources: 23 | - repoURL: https://kostis-codefresh.github.io/multi-sources-example 24 | chart: my-chart 25 | targetRevision: '{{.chart}}' 26 | helm: 27 | valueFiles: 28 | - $values/helm-multi-source/my-values/common-values.yaml 29 | - $values/helm-multi-source/my-values/app-version/{{.version}}-values.yaml 30 | - $values/helm-multi-source/my-values/env-type/{{.type}}-values.yaml 31 | - $values/helm-multi-source/my-values/regions/{{.region}}-values.yaml 32 | - $values/helm-multi-source/my-values/envs/{{.env}}-values.yaml 33 | - repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git' 34 | targetRevision: HEAD 35 | ref: values 36 | 37 | # Destination cluster and namespace to deploy the application 38 | destination: 39 | server: https://kubernetes.default.svc 40 | namespace: '{{.env}}' 41 | 42 | # Sync policy 43 | syncPolicy: 44 | syncOptions: 45 | - CreateNamespace=true 46 | automated: 47 | prune: true 48 | selfHeal: true 49 | 50 | -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/env-config/integration/gpu/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "integration-gpu", 3 | "region": "us", 4 | "type": "non-prod", 5 | "version": "prod", 6 | "chart": "0.1.0" 7 | } -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/env-config/integration/non-gpu/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "integration-non-gpu", 3 | "region": "us", 4 | "type": "non-prod", 5 | "version": "qa", 6 | "chart": "0.2.0" 7 | } -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/env-config/prod/eu/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "prod-eu", 3 | "region": "eu", 4 | "type": "prod", 5 | "version": "prod", 6 | "chart": "0.1.0" 7 | } -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/env-config/prod/us/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "prod-us", 3 | "region": "us", 4 | "type": "prod", 5 | "version": "prod", 6 | "chart": "0.1.0" 7 | } -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/env-config/qa/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "qa", 3 | "region": "us", 4 | "type": "non-prod", 5 | "version": "qa", 6 | "chart": "0.2.0" 7 | } -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/env-config/staging/asia/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "qa", 3 | "region": "us", 4 | "type": "non-prod", 5 | "version": "qa", 6 | "chart": "0.2.0" 7 | } -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/env-config/staging/eu/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "staging-eu", 3 | "region": "eu", 4 | "type": "non-prod", 5 | "version": "staging", 6 | "chart": "0.2.0" 7 | } -------------------------------------------------------------------------------- /helm-multi-source/03-external-repo/env-config/staging/us/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "staging-us", 3 | "region": "us", 4 | "type": "non-prod", 5 | "version": "staging", 6 | "chart": "0.2.0" 7 | } -------------------------------------------------------------------------------- /helm-multi-source/my-chart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /helm-multi-source/my-chart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: my-chart 3 | description: Simple Environment Application 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.0 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | # It is recommended to use it with quotes. 24 | appVersion: "1.16.0" 25 | -------------------------------------------------------------------------------- /helm-multi-source/my-chart/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Application was deployed. 2 | 3 | Version {{.Values.imageVersion }} 4 | Environment {{.Values.environment }} 5 | Type {{.Values.environmentType }} 6 | Replicas {{.Values.replicaCount }} 7 | Region {{.Values.region }} 8 | Theme {{.Values.userInterfaceTheme }} 9 | Cache size: {{.Values.cacheSize }} 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /helm-multi-source/my-chart/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: {{ .Values.replicaCount }} 8 | selector: 9 | matchLabels: 10 | app: trivial-go-web-app 11 | template: 12 | metadata: 13 | labels: 14 | app: trivial-go-web-app 15 | spec: 16 | containers: 17 | - name: webserver-simple 18 | imagePullPolicy: Always 19 | image: docker.io/kostiscodefresh/simple-env-app:{{ .Values.imageVersion }} 20 | ports: 21 | - containerPort: 8080 22 | env: 23 | - name: ENV 24 | value: {{ quote .Values.environment }} 25 | - name: ENV_TYPE 26 | value: {{ quote .Values.environmentType }} 27 | - name: REGION 28 | value: {{ quote .Values.region }} 29 | - name: PAYPAL_URL 30 | value: {{ quote .Values.paypalUrl }} 31 | - name: DB_USER 32 | value: {{ quote .Values.dbUser }} 33 | - name: DB_PASSWORD 34 | value: {{ quote .Values.dbPassword }} 35 | - name: GPU_ENABLED 36 | value: {{ quote .Values.gpuEnabled }} 37 | - name: UI_THEME 38 | value: {{ quote .Values.userInterfaceTheme }} 39 | - name: CACHE_SIZE 40 | value: {{ quote .Values.cacheSize }} 41 | - name: PAGE_LIMIT 42 | value: {{ quote .Values.pageLimit }} 43 | - name: SORTING 44 | value: {{ quote .Values.sorting }} 45 | - name: N_BUCKETS 46 | value: {{ quote .Values.nBuckets }} 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /helm-multi-source/my-chart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: trivial-go-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 -------------------------------------------------------------------------------- /helm-multi-source/my-chart/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for my-chart. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | # Kubernetes settings 6 | replicaCount: 1 7 | 8 | # Application image version 9 | imageVersion: "1.0" 10 | 11 | # Environment settings 12 | environment: dev 13 | environmentType: non-prod 14 | region: dev 15 | paypalUrl: "http://example.com" 16 | dbUser: "empty" 17 | dbPassword: "empty" 18 | 19 | 20 | 21 | # Application settings 22 | userInterfaceTheme: "light" 23 | cacheSize: "1024kb" 24 | gpuEnabled: "0" 25 | pageLimit: "50" 26 | sorting: "Ascending" 27 | nBuckets: "42" 28 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/app-version/prod-values.yaml: -------------------------------------------------------------------------------- 1 | imageVersion: "1.0" -------------------------------------------------------------------------------- /helm-multi-source/my-values/app-version/qa-values.yaml: -------------------------------------------------------------------------------- 1 | imageVersion: "3.0" -------------------------------------------------------------------------------- /helm-multi-source/my-values/app-version/staging-values.yaml: -------------------------------------------------------------------------------- 1 | imageVersion: "2.0" -------------------------------------------------------------------------------- /helm-multi-source/my-values/common-values.yaml: -------------------------------------------------------------------------------- 1 | # Kubernetes settings 2 | replicaCount: 1 -------------------------------------------------------------------------------- /helm-multi-source/my-values/env-type/non-prod-values.yaml: -------------------------------------------------------------------------------- 1 | # Kubernetes settings 2 | replicaCount: 3 3 | 4 | # Environment settings 5 | environmentType: non-prod 6 | paypalUrl: "staging2.paypal.com" 7 | dbUser: "non-prod-user" 8 | dbPassword: "non-prod-password" 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/env-type/prod-values.yaml: -------------------------------------------------------------------------------- 1 | # Kubernetes settings 2 | replicaCount: 5 3 | 4 | # Environment settings 5 | environmentType: production 6 | paypalUrl: "production.paypal.com" 7 | dbUser: "prod_username" 8 | dbPassword: "prod_password" 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/envs/integration-gpu-values.yaml: -------------------------------------------------------------------------------- 1 | # Environment settings 2 | environment: integration-gpu 3 | 4 | # Application settings 5 | userInterfaceTheme: "light" 6 | cacheSize: "1024kb" 7 | gpuEnabled: "1" 8 | pageLimit: "50" 9 | sorting: "Ascending" 10 | nBuckets: "42" 11 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/envs/integration-non-gpu-values.yaml: -------------------------------------------------------------------------------- 1 | # Environment settings 2 | environment: integration-non-gpu 3 | 4 | # Application settings 5 | userInterfaceTheme: "dark" 6 | cacheSize: "1024kb" 7 | gpuEnabled: "0" 8 | pageLimit: "50" 9 | sorting: "descending" 10 | nBuckets: "48" 11 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/envs/prod-eu-values.yaml: -------------------------------------------------------------------------------- 1 | # Kubernetes settings 2 | replicaCount: 8 3 | 4 | # Environment settings 5 | environment: prod-eu 6 | 7 | # Application settings 8 | userInterfaceTheme: "dark" 9 | cacheSize: "1024kb" 10 | gpuEnabled: "1" 11 | pageLimit: "25" 12 | sorting: "Ascending" 13 | nBuckets: "42" 14 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/envs/prod-us-values.yaml: -------------------------------------------------------------------------------- 1 | # Kubernetes settings 2 | replicaCount: 10 3 | 4 | # Environment settings 5 | environment: prod-us 6 | 7 | # Application settings 8 | userInterfaceTheme: "dark" 9 | cacheSize: "1024kb" 10 | gpuEnabled: "1" 11 | pageLimit: "25" 12 | sorting: "Ascending" 13 | nBuckets: "42" 14 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/envs/qa-values.yaml: -------------------------------------------------------------------------------- 1 | # Environment settings 2 | environment: qa 3 | 4 | # Application settings 5 | userInterfaceTheme: "dark" 6 | cacheSize: "1024kb" 7 | gpuEnabled: "1" 8 | pageLimit: "25" 9 | sorting: "ascending" 10 | nBuckets: "42" 11 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/envs/staging-asia-values.yaml: -------------------------------------------------------------------------------- 1 | # Kubernetes settings 2 | replicaCount: 3 3 | 4 | # Environment settings 5 | environment: staging-asia 6 | 7 | # Application settings 8 | userInterfaceTheme: "dark" 9 | cacheSize: "1024kb" 10 | gpuEnabled: "1" 11 | pageLimit: "25" 12 | sorting: "Ascending" 13 | nBuckets: "42" 14 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/envs/staging-eu-values.yaml: -------------------------------------------------------------------------------- 1 | # Kubernetes settings 2 | replicaCount: 3 3 | 4 | # Environment settings 5 | environment: staging-eu 6 | 7 | # Application settings 8 | userInterfaceTheme: "dark" 9 | cacheSize: "1024kb" 10 | gpuEnabled: "1" 11 | pageLimit: "25" 12 | sorting: "Ascending" 13 | nBuckets: "42" 14 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/envs/staging-us-values.yaml: -------------------------------------------------------------------------------- 1 | # Kubernetes settings 2 | replicaCount: 3 3 | 4 | # Environment settings 5 | environment: staging-us 6 | 7 | # Application settings 8 | userInterfaceTheme: "light" 9 | cacheSize: "1024kb" 10 | gpuEnabled: "1" 11 | pageLimit: "25" 12 | sorting: "Ascending" 13 | nBuckets: "24" 14 | -------------------------------------------------------------------------------- /helm-multi-source/my-values/regions/asia-values.yaml: -------------------------------------------------------------------------------- 1 | # Environment settings 2 | region: asia -------------------------------------------------------------------------------- /helm-multi-source/my-values/regions/eu-values.yaml: -------------------------------------------------------------------------------- 1 | # Environment settings 2 | region: eu -------------------------------------------------------------------------------- /helm-multi-source/my-values/regions/us-values.yaml: -------------------------------------------------------------------------------- 1 | # Environment settings 2 | region: us -------------------------------------------------------------------------------- /preview-environments/kustomize-preview-app/deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-deployment 6 | spec: 7 | replicas: 1 8 | selector: 9 | matchLabels: 10 | app: dummy-web-app 11 | template: 12 | metadata: 13 | labels: 14 | app: dummy-web-app 15 | spec: 16 | containers: 17 | - name: webserver-simple 18 | image: docker.io/kostiscodefresh/my-preview-app 19 | ports: 20 | - containerPort: 8080 21 | env: 22 | - name: GIT_BRANCH 23 | value: "default_kustomize_branch" 24 | - name: GIT_HASH 25 | value: "default_kustomize_hash" -------------------------------------------------------------------------------- /preview-environments/kustomize-preview-app/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - deployment.yml 6 | - service.yml -------------------------------------------------------------------------------- /preview-environments/kustomize-preview-app/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: simple-service 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: dummy-web-app 9 | ports: 10 | - protocol: TCP 11 | port: 80 12 | targetPort: 8080 13 | -------------------------------------------------------------------------------- /preview-environments/pr-generator/pr-generator.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: my-preview-apps 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - pullRequest: 11 | github: 12 | owner: codefresh-contrib 13 | repo: gitops-cert-level-3-examples 14 | requeueAfterSeconds: 180 15 | template: 16 | metadata: 17 | name: 'myapp-{{.branch}}' 18 | spec: 19 | source: 20 | repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git' 21 | targetRevision: HEAD 22 | path: preview-environments/kustomize-preview-app/ 23 | kustomize: 24 | images: 25 | - 'docker.io/kostiscodefresh/my-preview-app:{{.branch_slug}}' 26 | project: "default" 27 | destination: 28 | server: https://kubernetes.default.svc 29 | namespace: 'preview-{{.branch_slug}}' 30 | syncPolicy: 31 | automated: 32 | prune: true 33 | syncOptions: 34 | - CreateNamespace=true -------------------------------------------------------------------------------- /rollout-configmaps/with-generator/example-rollout.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-smart-rollout 5 | spec: 6 | replicas: 1 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: my-smart-rollout-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: my-smart-rollout-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | revisionHistoryLimit: 1 22 | selector: 23 | matchLabels: 24 | app: my-smart-rollout 25 | template: 26 | metadata: 27 | labels: 28 | app: my-smart-rollout 29 | spec: 30 | containers: 31 | - name: my-container 32 | image: docker.io/kostiscodefresh/configmaps-argo-rollouts-example:1.0 33 | env: 34 | - name: APP_VERSION 35 | valueFrom: 36 | configMapKeyRef: 37 | name: my-settings 38 | key: APP_VERSION 39 | - name: ENV 40 | valueFrom: 41 | configMapKeyRef: 42 | name: my-settings 43 | key: ENV 44 | - name: ENV_TYPE 45 | valueFrom: 46 | configMapKeyRef: 47 | name: my-settings 48 | key: ENV_TYPE 49 | - name: REGION 50 | valueFrom: 51 | configMapKeyRef: 52 | name: my-settings 53 | key: REGION 54 | - name: PAYPAL_URL 55 | valueFrom: 56 | configMapKeyRef: 57 | name: my-settings 58 | key: PAYPAL_URL 59 | - name: DB_USER 60 | valueFrom: 61 | configMapKeyRef: 62 | name: my-settings 63 | key: DB_USER 64 | - name: DB_PASSWORD 65 | valueFrom: 66 | configMapKeyRef: 67 | name: my-settings 68 | key: DB_PASSWORD 69 | - name: GPU_ENABLED 70 | valueFrom: 71 | configMapKeyRef: 72 | name: my-settings 73 | key: GPU_ENABLED 74 | - name: UI_THEME 75 | valueFrom: 76 | configMapKeyRef: 77 | name: my-settings 78 | key: UI_THEME 79 | - name: CACHE_SIZE 80 | valueFrom: 81 | configMapKeyRef: 82 | name: my-settings 83 | key: CACHE_SIZE 84 | - name: PAGE_LIMIT 85 | valueFrom: 86 | configMapKeyRef: 87 | name: my-settings 88 | key: PAGE_LIMIT 89 | - name: SORTING 90 | valueFrom: 91 | configMapKeyRef: 92 | name: my-settings 93 | key: SORTING 94 | - name: N_BUCKETS 95 | valueFrom: 96 | configMapKeyRef: 97 | name: my-settings 98 | key: N_BUCKETS 99 | ports: 100 | - name: http 101 | containerPort: 8080 102 | protocol: TCP 103 | livenessProbe: 104 | httpGet: 105 | path: /health 106 | port: 8080 107 | readinessProbe: 108 | httpGet: 109 | path: /health 110 | port: 8080 111 | -------------------------------------------------------------------------------- /rollout-configmaps/with-generator/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | # declare ConfigMap as a resource 4 | resources: 5 | - example-rollout.yml 6 | - service-active.yml 7 | - service-preview.yml 8 | 9 | # declare ConfigMap from a ConfigMapGenerator 10 | configMapGenerator: 11 | - name: my-settings 12 | literals: 13 | - APP_VERSION=1.0 14 | - ENV="asia-staging" 15 | - ENV_TYPE="non-prod" 16 | - REGION="asia" 17 | - PAYPAL_URL="staging2.paypal.com" 18 | - DB_USER="non-prod-user" 19 | - DB_PASSWORD="non-prod-password" 20 | - GPU_ENABLED="0" 21 | - UI_THEME="light" 22 | - CACHE_SIZE="2048kb" 23 | - PAGE_LIMIT="25" 24 | - SORTING="ascending" 25 | - N_BUCKETS="42" -------------------------------------------------------------------------------- /rollout-configmaps/with-generator/service-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: my-smart-rollout-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: my-smart-rollout 9 | ports: 10 | - nodePort: 31000 11 | protocol: TCP 12 | port: 8080 13 | name: active-port -------------------------------------------------------------------------------- /rollout-configmaps/with-generator/service-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: my-smart-rollout-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: my-smart-rollout 9 | ports: 10 | - nodePort: 31001 11 | protocol: TCP 12 | port: 8080 13 | name: preview-port -------------------------------------------------------------------------------- /rollout-configmaps/with-smart-generator/example-rollout.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-smart-rollout 5 | spec: 6 | replicas: 1 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: my-smart-rollout-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: my-smart-rollout-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | revisionHistoryLimit: 1 22 | selector: 23 | matchLabels: 24 | app: my-smart-rollout 25 | template: 26 | metadata: 27 | labels: 28 | app: my-smart-rollout 29 | spec: 30 | containers: 31 | - name: my-container 32 | image: docker.io/kostiscodefresh/configmaps-argo-rollouts-example:1.0 33 | env: 34 | - name: APP_VERSION 35 | valueFrom: 36 | configMapKeyRef: 37 | name: my-settings 38 | key: APP_VERSION 39 | - name: ENV 40 | valueFrom: 41 | configMapKeyRef: 42 | name: my-settings 43 | key: ENV 44 | - name: ENV_TYPE 45 | valueFrom: 46 | configMapKeyRef: 47 | name: my-settings 48 | key: ENV_TYPE 49 | - name: REGION 50 | valueFrom: 51 | configMapKeyRef: 52 | name: my-settings 53 | key: REGION 54 | - name: PAYPAL_URL 55 | valueFrom: 56 | configMapKeyRef: 57 | name: my-settings 58 | key: PAYPAL_URL 59 | - name: DB_USER 60 | valueFrom: 61 | configMapKeyRef: 62 | name: my-settings 63 | key: DB_USER 64 | - name: DB_PASSWORD 65 | valueFrom: 66 | configMapKeyRef: 67 | name: my-settings 68 | key: DB_PASSWORD 69 | - name: GPU_ENABLED 70 | valueFrom: 71 | configMapKeyRef: 72 | name: my-settings 73 | key: GPU_ENABLED 74 | - name: UI_THEME 75 | valueFrom: 76 | configMapKeyRef: 77 | name: my-settings 78 | key: UI_THEME 79 | - name: CACHE_SIZE 80 | valueFrom: 81 | configMapKeyRef: 82 | name: my-settings 83 | key: CACHE_SIZE 84 | - name: PAGE_LIMIT 85 | valueFrom: 86 | configMapKeyRef: 87 | name: my-settings 88 | key: PAGE_LIMIT 89 | - name: SORTING 90 | valueFrom: 91 | configMapKeyRef: 92 | name: my-settings 93 | key: SORTING 94 | - name: N_BUCKETS 95 | valueFrom: 96 | configMapKeyRef: 97 | name: my-settings 98 | key: N_BUCKETS 99 | ports: 100 | - name: http 101 | containerPort: 8080 102 | protocol: TCP 103 | livenessProbe: 104 | httpGet: 105 | path: /health 106 | port: 8080 107 | readinessProbe: 108 | httpGet: 109 | path: /health 110 | port: 8080 111 | -------------------------------------------------------------------------------- /rollout-configmaps/with-smart-generator/kustomization.yml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | # declare ConfigMap as a resource 4 | resources: 5 | - example-rollout.yml 6 | - service-active.yml 7 | - service-preview.yml 8 | 9 | configurations: 10 | - https://argoproj.github.io/argo-rollouts/features/kustomize/rollout-transform.yaml 11 | 12 | # declare ConfigMap from a ConfigMapGenerator 13 | configMapGenerator: 14 | - name: my-settings 15 | literals: 16 | - APP_VERSION=1.0 17 | - ENV="asia-staging" 18 | - ENV_TYPE="non-prod" 19 | - REGION="asia" 20 | - PAYPAL_URL="staging2.paypal.com" 21 | - DB_USER="non-prod-user" 22 | - DB_PASSWORD="non-prod-password" 23 | - GPU_ENABLED="0" 24 | - UI_THEME="light" 25 | - CACHE_SIZE="2048kb" 26 | - PAGE_LIMIT="25" 27 | - SORTING="ascending" 28 | - N_BUCKETS="42" -------------------------------------------------------------------------------- /rollout-configmaps/with-smart-generator/service-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: my-smart-rollout-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: my-smart-rollout 9 | ports: 10 | - nodePort: 31000 11 | protocol: TCP 12 | port: 8080 13 | name: active-port -------------------------------------------------------------------------------- /rollout-configmaps/with-smart-generator/service-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: my-smart-rollout-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: my-smart-rollout 9 | ports: 10 | - nodePort: 31001 11 | protocol: TCP 12 | port: 8080 13 | name: preview-port -------------------------------------------------------------------------------- /rollout-configmaps/without-generator/example-rollout.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-example-rollout 5 | spec: 6 | replicas: 1 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: configmaps-example-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: configmaps-example-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | revisionHistoryLimit: 1 22 | selector: 23 | matchLabels: 24 | app: configmaps-example 25 | template: 26 | metadata: 27 | labels: 28 | app: configmaps-example 29 | spec: 30 | containers: 31 | - name: my-container 32 | image: docker.io/kostiscodefresh/configmaps-argo-rollouts-example:1.0 33 | env: 34 | - name: APP_VERSION 35 | valueFrom: 36 | configMapKeyRef: 37 | name: my-settings 38 | key: APP_VERSION 39 | - name: ENV 40 | valueFrom: 41 | configMapKeyRef: 42 | name: my-settings 43 | key: ENV 44 | - name: ENV_TYPE 45 | valueFrom: 46 | configMapKeyRef: 47 | name: my-settings 48 | key: ENV_TYPE 49 | - name: REGION 50 | valueFrom: 51 | configMapKeyRef: 52 | name: my-settings 53 | key: REGION 54 | - name: PAYPAL_URL 55 | valueFrom: 56 | configMapKeyRef: 57 | name: my-settings 58 | key: PAYPAL_URL 59 | - name: DB_USER 60 | valueFrom: 61 | configMapKeyRef: 62 | name: my-settings 63 | key: DB_USER 64 | - name: DB_PASSWORD 65 | valueFrom: 66 | configMapKeyRef: 67 | name: my-settings 68 | key: DB_PASSWORD 69 | - name: GPU_ENABLED 70 | valueFrom: 71 | configMapKeyRef: 72 | name: my-settings 73 | key: GPU_ENABLED 74 | - name: UI_THEME 75 | valueFrom: 76 | configMapKeyRef: 77 | name: my-settings 78 | key: UI_THEME 79 | - name: CACHE_SIZE 80 | valueFrom: 81 | configMapKeyRef: 82 | name: my-settings 83 | key: CACHE_SIZE 84 | - name: PAGE_LIMIT 85 | valueFrom: 86 | configMapKeyRef: 87 | name: my-settings 88 | key: PAGE_LIMIT 89 | - name: SORTING 90 | valueFrom: 91 | configMapKeyRef: 92 | name: my-settings 93 | key: SORTING 94 | - name: N_BUCKETS 95 | valueFrom: 96 | configMapKeyRef: 97 | name: my-settings 98 | key: N_BUCKETS 99 | ports: 100 | - name: http 101 | containerPort: 8080 102 | protocol: TCP 103 | livenessProbe: 104 | httpGet: 105 | path: /health 106 | port: 8080 107 | readinessProbe: 108 | httpGet: 109 | path: /health 110 | port: 8080 111 | -------------------------------------------------------------------------------- /rollout-configmaps/without-generator/my-settings.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: my-settings 5 | data: 6 | APP_VERSION: "1.0" 7 | ENV: "asia-staging" 8 | ENV_TYPE: "non-prod" 9 | REGION: "asia" 10 | PAYPAL_URL: "staging2.paypal.com" 11 | DB_USER: "non-prod-user" 12 | DB_PASSWORD: "non-prod-password" 13 | GPU_ENABLED: "0" 14 | UI_THEME: "light" 15 | CACHE_SIZE: "2048kb" 16 | PAGE_LIMIT: "25" 17 | SORTING: "ascending" 18 | N_BUCKETS: "42" 19 | 20 | 21 | -------------------------------------------------------------------------------- /rollout-configmaps/without-generator/service-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: configmaps-example-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: configmaps-example 9 | ports: 10 | - nodePort: 31000 11 | protocol: TCP 12 | port: 8080 13 | name: active-port 14 | 15 | -------------------------------------------------------------------------------- /rollout-configmaps/without-generator/service-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: configmaps-example-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: configmaps-example 9 | ports: 10 | - nodePort: 31001 11 | protocol: TCP 12 | port: 8080 13 | name: preview-port -------------------------------------------------------------------------------- /rollout-multiple/legacy/backend-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: backend-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: interest 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 32000 -------------------------------------------------------------------------------- /rollout-multiple/legacy/backend-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: backend-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: interest 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 32001 -------------------------------------------------------------------------------- /rollout-multiple/legacy/frontend-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: frontend-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: loan 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 31000 -------------------------------------------------------------------------------- /rollout-multiple/legacy/frontend-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: frontend-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: loan 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 31001 -------------------------------------------------------------------------------- /rollout-multiple/legacy/rollout-be.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-legacy-backend 5 | spec: 6 | replicas: 2 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: backend-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: backend-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | revisionHistoryLimit: 2 22 | selector: 23 | matchLabels: 24 | app: interest 25 | template: 26 | metadata: 27 | labels: 28 | app: interest 29 | spec: 30 | containers: 31 | - name: my-backend-container 32 | image: docker.io/kostiscodefresh/interest:latest 33 | imagePullPolicy: Always 34 | env: 35 | - name: APP_VERSION 36 | value: "1.0" 37 | ports: 38 | - name: http 39 | containerPort: 8080 40 | protocol: TCP 41 | livenessProbe: 42 | httpGet: 43 | path: /health/live 44 | port: 8080 45 | readinessProbe: 46 | httpGet: 47 | path: /health/ready 48 | port: 8080 49 | -------------------------------------------------------------------------------- /rollout-multiple/legacy/rollout-fe.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-legacy-frontend 5 | spec: 6 | replicas: 2 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: frontend-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: frontend-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | activeMetadata: 22 | labels: 23 | backendHost: backend-active 24 | backendPort: "8080" 25 | role: active 26 | previewMetadata: 27 | labels: 28 | backendHost: backend-preview 29 | backendPort: "8080" 30 | role: preview 31 | revisionHistoryLimit: 2 32 | selector: 33 | matchLabels: 34 | app: loan 35 | template: 36 | metadata: 37 | labels: 38 | app: loan 39 | spec: 40 | containers: 41 | - name: my-frontend-container 42 | image: docker.io/kostiscodefresh/loan:latest 43 | imagePullPolicy: Always 44 | env: 45 | - name: APP_VERSION 46 | value: "1.0" 47 | volumeMounts: 48 | - name: podinfo 49 | mountPath: /etc/podinfo 50 | ports: 51 | - name: http 52 | containerPort: 8080 53 | protocol: TCP 54 | livenessProbe: 55 | httpGet: 56 | path: /health/live 57 | port: 8080 58 | readinessProbe: 59 | httpGet: 60 | path: /health/ready 61 | port: 8080 62 | volumes: 63 | - name: podinfo 64 | downwardAPI: 65 | items: 66 | - path: "labels" 67 | fieldRef: 68 | fieldPath: metadata.labels 69 | -------------------------------------------------------------------------------- /rollout-multiple/modern/backend-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: backend-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: interest 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 32000 -------------------------------------------------------------------------------- /rollout-multiple/modern/backend-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: backend-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: interest 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 32001 -------------------------------------------------------------------------------- /rollout-multiple/modern/frontend-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: frontend-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: loan 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 31000 -------------------------------------------------------------------------------- /rollout-multiple/modern/frontend-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: frontend-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: loan 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 31001 -------------------------------------------------------------------------------- /rollout-multiple/modern/frontend-settings.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: frontend-settings 5 | data: 6 | labels: | 7 | backendHost="backend-active" 8 | backendPort="8080" 9 | role="active" 10 | -------------------------------------------------------------------------------- /rollout-multiple/modern/rollout-be.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-modern-backend 5 | spec: 6 | replicas: 2 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: backend-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: backend-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | revisionHistoryLimit: 2 22 | selector: 23 | matchLabels: 24 | app: interest 25 | template: 26 | metadata: 27 | labels: 28 | app: interest 29 | spec: 30 | containers: 31 | - name: my-backend-container 32 | image: docker.io/kostiscodefresh/interest:latest 33 | env: 34 | - name: APP_VERSION 35 | value: "1.0" 36 | ports: 37 | - name: http 38 | containerPort: 8080 39 | protocol: TCP 40 | livenessProbe: 41 | httpGet: 42 | path: /health/live 43 | port: 8080 44 | readinessProbe: 45 | httpGet: 46 | path: /health/ready 47 | port: 8080 48 | -------------------------------------------------------------------------------- /rollout-multiple/modern/rollout-fe.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-modern-frontend 5 | spec: 6 | replicas: 2 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: frontend-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: frontend-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | revisionHistoryLimit: 2 22 | selector: 23 | matchLabels: 24 | app: loan 25 | template: 26 | metadata: 27 | labels: 28 | app: loan 29 | spec: 30 | containers: 31 | - name: my-frontend-container 32 | image: docker.io/kostiscodefresh/loan:latest 33 | env: 34 | - name: APP_VERSION 35 | value: "1.0" 36 | volumeMounts: 37 | - name: config-volume 38 | mountPath: /etc/podinfo 39 | ports: 40 | - name: http 41 | containerPort: 8080 42 | protocol: TCP 43 | livenessProbe: 44 | httpGet: 45 | path: /health/live 46 | port: 8080 47 | readinessProbe: 48 | httpGet: 49 | path: /health/ready 50 | port: 8080 51 | volumes: 52 | - name: config-volume 53 | configMap: 54 | name: frontend-settings 55 | items: 56 | - key: "labels" 57 | path: "labels" 58 | -------------------------------------------------------------------------------- /rollout-workers/naive-rollout/config.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: special-config 5 | data: 6 | labels: | 7 | rabbitHost="rabbitmq" 8 | rabbitPort="5672" 9 | role="active" 10 | rabbitQueue="myProductionQueue" 11 | 12 | -------------------------------------------------------------------------------- /rollout-workers/naive-rollout/worker-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: worker-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: worker 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 31000 -------------------------------------------------------------------------------- /rollout-workers/naive-rollout/worker-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: worker-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: worker 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 31001 -------------------------------------------------------------------------------- /rollout-workers/naive-rollout/worker.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-simple-worker 5 | spec: 6 | replicas: 1 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: worker-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: worker-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | revisionHistoryLimit: 2 22 | selector: 23 | matchLabels: 24 | app: worker 25 | template: 26 | metadata: 27 | labels: 28 | app: worker 29 | spec: 30 | containers: 31 | - name: my-worker-container 32 | image: docker.io/kostiscodefresh/worker:latest 33 | imagePullPolicy: Always 34 | env: 35 | - name: APP_VERSION 36 | value: "1.0" 37 | volumeMounts: 38 | - name: config-volume 39 | mountPath: /etc/podinfo 40 | ports: 41 | - name: http 42 | containerPort: 8080 43 | protocol: TCP 44 | livenessProbe: 45 | httpGet: 46 | path: /health/live 47 | port: 8080 48 | readinessProbe: 49 | httpGet: 50 | path: /health/ready 51 | port: 8080 52 | volumes: 53 | - name: config-volume 54 | configMap: 55 | name: special-config 56 | items: 57 | - key: "labels" 58 | path: "labels" 59 | 60 | -------------------------------------------------------------------------------- /rollout-workers/queue/rabbitmq-service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: rabbitmq 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: rabbitmq 9 | ports: 10 | - name: amqp 11 | protocol: TCP 12 | port: 5672 13 | nodePort: 30672 14 | - name: http 15 | protocol: TCP 16 | port: 15672 17 | nodePort: 31672 -------------------------------------------------------------------------------- /rollout-workers/queue/rabbitmq.yml: -------------------------------------------------------------------------------- 1 | ## 2 | ## This is a quick-n-dirty deployment method for RabbitMQ 3 | ## just for the demo purposes 4 | ## 5 | ## DO NOT USE IN PRODUCTION 6 | 7 | apiVersion: apps/v1 8 | kind: StatefulSet 9 | metadata: 10 | name: rabbitmq-server 11 | spec: 12 | serviceName: rabbitmq 13 | replicas: 1 14 | selector: 15 | matchLabels: 16 | app: rabbitmq 17 | template: 18 | metadata: 19 | labels: 20 | app: rabbitmq 21 | spec: 22 | containers: 23 | - name: server 24 | image: rabbitmq:3-management 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /rollout-workers/smart-rollout/worker-active.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: worker-active 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: worker 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 31000 -------------------------------------------------------------------------------- /rollout-workers/smart-rollout/worker-preview.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: worker-preview 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: worker 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 8080 13 | nodePort: 31001 -------------------------------------------------------------------------------- /rollout-workers/smart-rollout/worker.yml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Rollout 3 | metadata: 4 | name: my-smart-worker 5 | spec: 6 | replicas: 1 7 | strategy: 8 | blueGreen: 9 | # activeService specifies the service to update with the new template hash at time of promotion. 10 | # This field is mandatory for the blueGreen update strategy. 11 | activeService: worker-active 12 | # previewService specifies the service to update with the new template hash before promotion. 13 | # This allows the preview stack to be reachable without serving production traffic. 14 | # This field is optional. 15 | previewService: worker-preview 16 | # autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout 17 | # immediately before the promotion. If omitted, the default behavior is to promote the new 18 | # stack as soon as the ReplicaSet are completely ready/available. 19 | # Rollouts can be resumed using: `kubectl argo rollouts resume ROLLOUT` 20 | autoPromotionEnabled: false 21 | activeMetadata: 22 | labels: 23 | rabbitHost: rabbitmq 24 | rabbitPort: "5672" 25 | role: active 26 | rabbitQueue: myProductionQueue 27 | previewMetadata: 28 | labels: 29 | rabbitHost: rabbitmq 30 | rabbitPort: "5672" 31 | role: preview 32 | rabbitQueue: myPreviewQueue 33 | revisionHistoryLimit: 2 34 | selector: 35 | matchLabels: 36 | app: worker 37 | template: 38 | metadata: 39 | labels: 40 | app: worker 41 | spec: 42 | containers: 43 | - name: my-worker-container 44 | image: docker.io/kostiscodefresh/worker:latest 45 | imagePullPolicy: Always 46 | env: 47 | - name: APP_VERSION 48 | value: "1.0" 49 | volumeMounts: 50 | - name: podinfo 51 | mountPath: /etc/podinfo 52 | ports: 53 | - name: http 54 | containerPort: 8080 55 | protocol: TCP 56 | livenessProbe: 57 | httpGet: 58 | path: /health/live 59 | port: 8080 60 | readinessProbe: 61 | httpGet: 62 | path: /health/ready 63 | port: 8080 64 | volumes: 65 | - name: podinfo 66 | downwardAPI: 67 | items: 68 | - path: "labels" 69 | fieldRef: 70 | fieldPath: metadata.labels 71 | -------------------------------------------------------------------------------- /rollout-workers/tester/tester-deployment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: simple-tester 6 | spec: 7 | replicas: 1 8 | selector: 9 | matchLabels: 10 | app: tester 11 | template: 12 | metadata: 13 | labels: 14 | app: tester 15 | spec: 16 | containers: 17 | - name: gui-tester 18 | image: docker.io/kostiscodefresh/tester:latest 19 | env: 20 | - name: RABBIT_HOST 21 | value: "rabbitmq" ## same name as rabbitMQ service 22 | 23 | ports: 24 | - containerPort: 7000 25 | -------------------------------------------------------------------------------- /rollout-workers/tester/tester-service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: tester 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: tester 9 | ports: 10 | - name: http 11 | protocol: TCP 12 | port: 7000 13 | nodePort: 30700 -------------------------------------------------------------------------------- /shared-track-resources/argocd-noauth/argocd-nodeport-service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: argocd-server 6 | managedFields: 7 | name: argocd-server-nodeport 8 | namespace: argocd 9 | spec: 10 | ports: 11 | - nodePort: 30443 12 | port: 8080 13 | protocol: TCP 14 | selector: 15 | app.kubernetes.io/name: argocd-server 16 | type: NodePort 17 | -------------------------------------------------------------------------------- /shared-track-resources/vault-install/vault-nodeport.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: vault 6 | managedFields: 7 | name: vault-nodeport 8 | namespace: vault 9 | spec: 10 | ports: 11 | - nodePort: 30200 12 | port: 8200 13 | protocol: TCP 14 | selector: 15 | app.kubernetes.io/instance: vault 16 | app.kubernetes.io/name: vault 17 | component: server 18 | type: NodePort 19 | -------------------------------------------------------------------------------- /solutions/helm-multi-source/after-promotion.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: all-my-envs 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - git: 11 | repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 12 | revision: solution-helm-values 13 | files: 14 | - path: "helm-multi-source/03-external-repo/env-config/**/config.json" 15 | template: 16 | metadata: 17 | name: '{{.env}}' 18 | spec: 19 | # The project the application belongs to. 20 | project: default 21 | 22 | sources: 23 | - repoURL: https://kostis-codefresh.github.io/multi-sources-example 24 | chart: my-chart 25 | targetRevision: '{{.chart}}' 26 | helm: 27 | valueFiles: 28 | - $values/helm-multi-source/my-values/common-values.yaml 29 | - $values/helm-multi-source/my-values/app-version/{{.version}}-values.yaml 30 | - $values/helm-multi-source/my-values/env-type/{{.type}}-values.yaml 31 | - $values/helm-multi-source/my-values/regions/{{.region}}-values.yaml 32 | - $values/helm-multi-source/my-values/envs/{{.env}}-values.yaml 33 | - repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git' 34 | targetRevision: solution-helm-values 35 | ref: values 36 | 37 | # Destination cluster and namespace to deploy the application 38 | destination: 39 | server: https://kubernetes.default.svc 40 | namespace: '{{.env}}' 41 | 42 | # Sync policy 43 | syncPolicy: 44 | syncOptions: 45 | - CreateNamespace=true 46 | automated: 47 | prune: true 48 | selfHeal: true 49 | 50 | -------------------------------------------------------------------------------- /solutions/helm-multi-source/all-my-envs-with-helm-repo.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: all-my-envs 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - list: 11 | elements: 12 | - env: integration-gpu 13 | region: us 14 | type: non-prod 15 | version: qa 16 | - env: integration-non-gpu 17 | region: us 18 | type: non-prod 19 | version: qa 20 | - env: qa 21 | region: us 22 | type: non-prod 23 | version: qa 24 | - env: staging-asia 25 | region: asia 26 | type: non-prod 27 | version: staging 28 | - env: staging-eu 29 | region: eu 30 | type: non-prod 31 | version: staging 32 | - env: staging-us 33 | region: us 34 | type: non-prod 35 | version: staging 36 | - env: prod-eu 37 | region: eu 38 | type: prod 39 | version: prod 40 | - env: prod-us 41 | region: us 42 | type: prod 43 | version: prod 44 | template: 45 | metadata: 46 | name: '{{.env}}' 47 | spec: 48 | # The project the application belongs to. 49 | project: default 50 | 51 | sources: 52 | - repoURL: https://kostis-codefresh.github.io/multi-sources-example 53 | chart: my-chart 54 | targetRevision: 0.1.0 55 | helm: 56 | valueFiles: 57 | - $values/helm-multi-source/my-values/common-values.yaml 58 | - $values/helm-multi-source/my-values/app-version/{{.version}}-values.yaml 59 | - $values/helm-multi-source/my-values/env-type/{{.type}}-values.yaml 60 | - $values/helm-multi-source/my-values/regions/{{.region}}-values.yaml 61 | - $values/helm-multi-source/my-values/envs/{{.env}}-values.yaml 62 | - repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git' 63 | targetRevision: HEAD 64 | ref: values 65 | 66 | # Destination cluster and namespace to deploy the application 67 | destination: 68 | server: https://kubernetes.default.svc 69 | namespace: '{{.env}}' 70 | 71 | # Sync policy 72 | syncPolicy: 73 | syncOptions: 74 | - CreateNamespace=true 75 | automated: 76 | prune: true 77 | selfHeal: true 78 | 79 | -------------------------------------------------------------------------------- /solutions/helm-multi-source/all-my-envs.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ApplicationSet 3 | metadata: 4 | name: all-my-envs 5 | namespace: argocd 6 | spec: 7 | goTemplate: true 8 | goTemplateOptions: ["missingkey=error"] 9 | generators: 10 | - list: 11 | elements: 12 | - env: integration-gpu 13 | region: us 14 | type: non-prod 15 | version: qa 16 | - env: integration-non-gpu 17 | region: us 18 | type: non-prod 19 | version: qa 20 | - env: qa 21 | region: us 22 | type: non-prod 23 | version: qa 24 | - env: staging-asia 25 | region: asia 26 | type: non-prod 27 | version: staging 28 | - env: staging-eu 29 | region: eu 30 | type: non-prod 31 | version: staging 32 | - env: staging-us 33 | region: us 34 | type: non-prod 35 | version: staging 36 | - env: prod-eu 37 | region: eu 38 | type: prod 39 | version: prod 40 | - env: prod-us 41 | region: us 42 | type: prod 43 | version: prod 44 | template: 45 | metadata: 46 | name: '{{.env}}' 47 | spec: 48 | # The project the application belongs to. 49 | project: default 50 | 51 | sources: 52 | - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 53 | path: helm-multi-source/my-chart 54 | targetRevision: HEAD 55 | helm: 56 | valueFiles: 57 | - $values/helm-multi-source/my-values/common-values.yaml 58 | - $values/helm-multi-source/my-values/app-version/{{.version}}-values.yaml 59 | - $values/helm-multi-source/my-values/env-type/{{.type}}-values.yaml 60 | - $values/helm-multi-source/my-values/regions/{{.region}}-values.yaml 61 | - $values/helm-multi-source/my-values/envs/{{.env}}-values.yaml 62 | - repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git' 63 | targetRevision: HEAD 64 | ref: values 65 | 66 | # Destination cluster and namespace to deploy the application 67 | destination: 68 | server: https://kubernetes.default.svc 69 | namespace: '{{.env}}' 70 | 71 | # Sync policy 72 | syncPolicy: 73 | syncOptions: 74 | - CreateNamespace=true 75 | automated: 76 | prune: true 77 | selfHeal: true 78 | 79 | -------------------------------------------------------------------------------- /solutions/helm-multi-source/prod-us-app.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: prod-us-app 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | project: default 10 | destination: 11 | server: https://kubernetes.default.svc 12 | namespace: prod-us 13 | sources: 14 | - repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git 15 | path: helm-multi-source/my-chart 16 | targetRevision: HEAD 17 | helm: 18 | valueFiles: 19 | - $values/helm-multi-source/my-values/common-values.yaml 20 | - $values/helm-multi-source/my-values/app-version/prod-values.yaml 21 | - $values/helm-multi-source/my-values/env-type/prod-values.yaml 22 | - $values/helm-multi-source/my-values/regions/us-values.yaml 23 | - $values/helm-multi-source/my-values/envs/prod-us-values.yaml 24 | - repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git' 25 | targetRevision: HEAD 26 | ref: values 27 | syncPolicy: 28 | syncOptions: 29 | - CreateNamespace=true 30 | automated: 31 | prune: true 32 | selfHeal: true 33 | --------------------------------------------------------------------------------