├── HelmCharts ├── MyChart1 │ ├── values.yaml │ ├── values_prod.yaml │ ├── values_dev.yaml │ ├── templates │ │ ├── service.yaml │ │ └── deployment.yaml │ └── Chart.yaml └── MyChart2 │ ├── values.yaml │ ├── values_prod.yaml │ ├── values_dev.yaml │ ├── templates │ ├── service.yaml │ └── deployment.yaml │ └── Chart.yaml ├── demo-dev ├── root.yaml └── applications │ ├── app1.yaml │ └── app2.yaml ├── demo-prod ├── root.yaml └── applications │ ├── app1.yaml │ └── app2.yaml └── README.md /HelmCharts/MyChart1/values.yaml: -------------------------------------------------------------------------------- 1 | # Default Values for my Helm Chart 2 | 3 | container: 4 | image: httpd:latest 5 | 6 | replicaCount: 1 -------------------------------------------------------------------------------- /HelmCharts/MyChart2/values.yaml: -------------------------------------------------------------------------------- 1 | # Default Values for my Helm Chart 2 | 3 | container: 4 | image: nginx:latest 5 | 6 | replicaCount: 1 -------------------------------------------------------------------------------- /HelmCharts/MyChart1/values_prod.yaml: -------------------------------------------------------------------------------- 1 | # Prod Override Values for my Helm Chart 2 | 3 | container: 4 | image: adv4000/k8sphp:version2 5 | 6 | replicaCount: 3 7 | -------------------------------------------------------------------------------- /HelmCharts/MyChart2/values_prod.yaml: -------------------------------------------------------------------------------- 1 | # Prod Override Values for my Helm Chart 2 | 3 | container: 4 | image: adv4000/k8sphp:version2 5 | 6 | replicaCount: 4 7 | -------------------------------------------------------------------------------- /HelmCharts/MyChart1/values_dev.yaml: -------------------------------------------------------------------------------- 1 | # Dev Override Values for my Helm Chart 2 | 3 | container: 4 | image: adv4000/k8sphp:version1 5 | 6 | replicaCount: 4 7 | 8 | -------------------------------------------------------------------------------- /HelmCharts/MyChart2/values_dev.yaml: -------------------------------------------------------------------------------- 1 | # Dev Override Values for my Helm Chart 2 | 3 | container: 4 | image: adv4000/k8sphp:version1 5 | 6 | replicaCount: 4 7 | 8 | -------------------------------------------------------------------------------- /HelmCharts/MyChart1/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Release.Name }}-service 5 | labels: 6 | owner: DenisAstahov 7 | spec: 8 | selector: 9 | project: {{ .Release.Name }} # Selecting PODS with those Labels 10 | ports: 11 | - name : {{ .Release.Name }}-listener 12 | protocol : TCP 13 | port : 80 # Port on Load Balancer 14 | targetPort: 80 # Port on POD 15 | type: LoadBalancer -------------------------------------------------------------------------------- /HelmCharts/MyChart2/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Release.Name }}-service 5 | labels: 6 | owner: DenisAstahov 7 | spec: 8 | selector: 9 | project: {{ .Release.Name }} # Selecting PODS with those Labels 10 | ports: 11 | - name : {{ .Release.Name }}-listener 12 | protocol : TCP 13 | port : 80 # Port on Load Balancer 14 | targetPort: 80 # Port on POD 15 | type: LoadBalancer -------------------------------------------------------------------------------- /HelmCharts/MyChart1/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name : App-HelmChart-1 3 | description: My Helm chart for Kubernetes 4 | type : application 5 | version : 0.1.0 # This is the Helm Chart version 6 | appVersion : "1.2.3" # This is the version of the application being deployed 7 | 8 | keywords: 9 | - apache 10 | - http 11 | - https 12 | - denisastahov 13 | 14 | maintainers: 15 | - name : Denis Astahov 16 | email: denis@astahov.net 17 | url : www.astahov.net 18 | -------------------------------------------------------------------------------- /HelmCharts/MyChart2/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name : App-HelmChart-1 3 | description: My Helm chart for Kubernetes 4 | type : application 5 | version : 0.1.0 # This is the Helm Chart version 6 | appVersion : "1.2.3" # This is the version of the application being deployed 7 | 8 | keywords: 9 | - apache 10 | - http 11 | - https 12 | - denisastahov 13 | 14 | maintainers: 15 | - name : Denis Astahov 16 | email: denis@astahov.net 17 | url : www.astahov.net 18 | -------------------------------------------------------------------------------- /demo-dev/root.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name : root 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | destination: 10 | name : in-cluster 11 | namespace: argocd 12 | source: 13 | path : "demo-dev/applications" 14 | repoURL: "git@github.com:adv4000/argocd.git" 15 | targetRevision: HEAD 16 | project: default 17 | syncPolicy: 18 | automated: 19 | prune : true 20 | selfHeal: true 21 | -------------------------------------------------------------------------------- /demo-prod/root.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name : root 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | destination: 10 | name : in-cluster 11 | namespace: argocd 12 | source: 13 | path : "demo-prod/applications" 14 | repoURL: "git@github.com:adv4000/argocd.git" 15 | targetRevision: HEAD 16 | project: default 17 | syncPolicy: 18 | automated: 19 | prune : true 20 | selfHeal: true 21 | -------------------------------------------------------------------------------- /HelmCharts/MyChart1/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion : apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-deployment 5 | labels: 6 | app : {{ .Release.Name }}-deployment 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | selector: 10 | matchLabels: 11 | project: {{ .Release.Name }} 12 | template: 13 | metadata: 14 | labels: 15 | project: {{ .Release.Name }} # Service will look for those PODS Labels!!! 16 | spec: 17 | containers: 18 | - name : {{ .Release.Name }}-web 19 | image: {{ .Values.container.image }} 20 | ports: 21 | - containerPort: 80 -------------------------------------------------------------------------------- /HelmCharts/MyChart2/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion : apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-deployment 5 | labels: 6 | app : {{ .Release.Name }}-deployment 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | selector: 10 | matchLabels: 11 | project: {{ .Release.Name }} 12 | template: 13 | metadata: 14 | labels: 15 | project: {{ .Release.Name }} # Service will look for those PODS Labels!!! 16 | spec: 17 | containers: 18 | - name : {{ .Release.Name }}-web 19 | image: {{ .Values.container.image }} 20 | ports: 21 | - containerPort: 80 -------------------------------------------------------------------------------- /demo-dev/applications/app1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name : myapp1 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | destination: 10 | name : in-cluster 11 | namespace: app1 12 | source: 13 | path : "HelmCharts/MyChart1" 14 | repoURL: "git@github.com:adv4000/argocd.git" 15 | targetRevision: HEAD 16 | helm: 17 | valueFiles: 18 | - values_dev.yaml 19 | parameters: 20 | - name: "container.image" 21 | value: adv4000/app1:v3 22 | 23 | project: default 24 | syncPolicy: 25 | automated: 26 | prune : true 27 | selfHeal: true 28 | syncOptions: 29 | - CreateNamespace=true 30 | -------------------------------------------------------------------------------- /demo-dev/applications/app2.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name : myapp2 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | destination: 10 | name : in-cluster 11 | namespace: app2 12 | source: 13 | path : "HelmCharts/MyChart2" 14 | repoURL: "git@github.com:adv4000/argocd.git" 15 | targetRevision: HEAD 16 | helm: 17 | valueFiles: 18 | - values_dev.yaml 19 | parameters: 20 | - name: "container.image" 21 | value: adv4000/app2:v2 22 | 23 | project: default 24 | syncPolicy: 25 | automated: 26 | prune : true 27 | selfHeal: true 28 | syncOptions: 29 | - CreateNamespace=true 30 | -------------------------------------------------------------------------------- /demo-prod/applications/app1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name : myapp1 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | destination: 10 | name : in-cluster 11 | namespace: app1 12 | source: 13 | path : "HelmCharts/MyChart1" 14 | repoURL: "git@github.com:adv4000/argocd.git" 15 | targetRevision: HEAD 16 | helm: 17 | valueFiles: 18 | - values_prod.yaml 19 | parameters: 20 | - name: "container.image" 21 | value: adv4000/app1:latest 22 | 23 | project: default 24 | syncPolicy: 25 | automated: 26 | prune : true 27 | selfHeal: true 28 | syncOptions: 29 | - CreateNamespace=true 30 | -------------------------------------------------------------------------------- /demo-prod/applications/app2.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name : myapp2 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | destination: 10 | name : in-cluster 11 | namespace: app2 12 | source: 13 | path : "HelmCharts/MyChart2" 14 | repoURL: "git@github.com:adv4000/argocd.git" 15 | targetRevision: HEAD 16 | helm: 17 | valueFiles: 18 | - values_prod.yaml 19 | parameters: 20 | - name: "container.image" 21 | value: adv4000/app2:latest 22 | 23 | project: default 24 | syncPolicy: 25 | automated: 26 | prune : true 27 | selfHeal: true 28 | syncOptions: 29 | - CreateNamespace=true 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ArgoCD Applications per EKS Cluster 2 | 3 | Name of the folder represent name of the EKS Cluster (Except HelmCharts). 4 | 5 | ``` 6 | │ 7 | ├── HelmCharts # All Helm Charts 8 | │ ├── ChartTest1 9 | │ │ ├── Chart.yaml 10 | │ │ ├── templates 11 | │ │ ├── values_dev.yaml # DEV Values 12 | │ │ ├── values_prod.yaml # PROD Values 13 | │ │ └── values.yaml # Default Values 14 | │ └── ChartTest2 15 | │ ├── Chart.yaml 16 | │ ├── templates 17 | │ ├── values_dev.yaml # DEV Values 18 | │ ├── values_prod.yaml # PROD Values 19 | │ └── values.yaml # Default Values 20 | │ 21 | ├── demo-dev # EKS Cluster name 22 | │ ├── applications 23 | │ │ ├── app1.yaml 24 | │ │ └── app2.yaml 25 | │ └── root.yaml # Root ArgoCD Application 26 | └── demo-prod # EKS Cluster name 27 | ├── applications 28 | │ ├── app1.yaml 29 | │ └── app2.yaml 30 | └── root.yaml # Root ArgoCD Application 31 | ``` 32 | 33 | Copyleft (c) by Denis Astahov. --------------------------------------------------------------------------------