Skip to content

Commit

Permalink
How to Set Up ArgoCD for Production? (EKS - ECR - Helm - App of Apps …
Browse files Browse the repository at this point in the history
…- Image Updater - GitOps) (antonputra#245)
  • Loading branch information
antonputra authored Aug 6, 2024
1 parent d1e5ba8 commit 6e2b2fe
Show file tree
Hide file tree
Showing 58 changed files with 1,880 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# New Video - https://youtu.be/YMBT1NguJJw
# New Video - https://youtu.be/_G_RY5trQao

[<img src="assets/199.png?raw=true">](https://youtu.be/YMBT1NguJJw)
[<img src="assets/200.png?raw=true">](https://youtu.be/_G_RY5trQao)

# Playlists

Expand Down
Binary file removed assets/199.png
Binary file not shown.
Binary file added assets/200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,5 @@
- [196 - AWS EKS Kubernetes Tutorial - Full Course](../lessons/196)
- [197 - Kubernetes Tutorial for Beginners - Full Course](../lessons/197)
- [198 - How To Structure Terraform Project (3 Levels)](../lessons/198)
- [199 - Docker Compose Tutorial for Beginners](../lessons/199)
- [199 - Docker Compose Tutorial for Beginners](../lessons/199)
- [200 - How to Set Up ArgoCD for Production?](../lessons/200)
8 changes: 8 additions & 0 deletions lessons/193/myapp/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lessons/200/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# How to Set Up ArgoCD for Production? (EKS - ECR - Helm - App of Apps - Image Updater - GitOps)

You can find tutorial [here](https://youtu.be/_G_RY5trQao).
28 changes: 28 additions & 0 deletions lessons/200/apps-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: apps-dev
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: [email protected]:antonputra/k8s.git
targetRevision: HEAD
path: envs/dev
directory:
recurse: true
destination:
server: https://kubernetes.default.svc
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- Validate=true
- CreateNamespace=false
- PrunePropagationPolicy=foreground
- PruneLast=true
28 changes: 28 additions & 0 deletions lessons/200/apps-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: apps-prod
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: [email protected]:antonputra/k8s.git
targetRevision: HEAD
path: envs/prod
directory:
recurse: true
destination:
server: https://kubernetes.default.svc
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- Validate=true
- CreateNamespace=false
- PrunePropagationPolicy=foreground
- PruneLast=true
20 changes: 20 additions & 0 deletions lessons/200/git-repo-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: v1
kind: Secret
metadata:
name: k8s-repo
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository
stringData:
url: [email protected]:antonputra/k8s.git
sshPrivateKey: |
-----BEGIN OPENSSH PRIVATE KEY-----
demob3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2
QyNTUxOQAAACDWk5iHCXxnwOx9gDx8X8ohitYRxoRL+Ejcp4bfzEwlUAAAAJi8E8+YvBPP
mAAAAAtzc2gtZWQyNTUxOQAAACDWk5iHCXxnwOx9gDx8X8ohitYRxoRL+Ejcp4bfzEwlUA
AAAEBVwhFnipLfQq4ykdLlZADuibumzrTyc8dkePKo7l6hkdaTmIcJfGfA7H2APHxfyiGK
1hHGhEv4SNynht/MTCVQAAAAFWFyZ29jZEBhbnRvbnB1dHJhLmNvbQ==
-----END OPENSSH PRIVATE KEY-----
insecure: "false"
enableLfs: "true"
1 change: 1 addition & 0 deletions lessons/200/k8s-private-repo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv
1 change: 1 addition & 0 deletions lessons/200/k8s-private-repo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# k8s
43 changes: 43 additions & 0 deletions lessons/200/k8s-private-repo/envs/dev/payments/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd-image-updater.argoproj.io/image-list: payments=424432388155.dkr.ecr.us-east-2.amazonaws.com/payments
argocd-image-updater.argoproj.io/payments.update-strategy: semver
argocd-image-updater.argoproj.io/write-back-method: git
finalizers:
- resources-finalizer.argocd.argoproj.io
name: payments-dev
namespace: argocd
spec:
destination:
namespace: dev
server: https://kubernetes.default.svc
project: default
source:
helm:
parameters:
- name: image.repository
value: 424432388155.dkr.ecr.us-east-2.amazonaws.com/payments
- name: service.port
value: '8080'
- name: livenessProbe.httpGet.path
value: /healthz
- name: readinessProbe.httpGet.path
value: /healthz
- name: image.tag
value: 0.1.0
path: helm-charts/payments
repoURL: [email protected]:antonputra/k8s.git
targetRevision: main
syncPolicy:
automated:
allowEmpty: false
prune: true
selfHeal: true
syncOptions:
- Validate=true
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
43 changes: 43 additions & 0 deletions lessons/200/k8s-private-repo/envs/dev/users/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd-image-updater.argoproj.io/image-list: users=424432388155.dkr.ecr.us-east-2.amazonaws.com/users:0.x
argocd-image-updater.argoproj.io/users.update-strategy: semver
argocd-image-updater.argoproj.io/write-back-method: git
finalizers:
- resources-finalizer.argocd.argoproj.io
name: users-dev
namespace: argocd
spec:
destination:
namespace: dev
server: https://kubernetes.default.svc
project: default
source:
helm:
parameters:
- name: image.repository
value: 424432388155.dkr.ecr.us-east-2.amazonaws.com/users
- name: service.port
value: '8080'
- name: livenessProbe.httpGet.path
value: /healthz
- name: readinessProbe.httpGet.path
value: /healthz
- name: image.tag
value: 0.1.0
path: helm-charts/users
repoURL: [email protected]:antonputra/k8s.git
targetRevision: main
syncPolicy:
automated:
allowEmpty: false
prune: true
selfHeal: true
syncOptions:
- Validate=true
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
39 changes: 39 additions & 0 deletions lessons/200/k8s-private-repo/envs/prod/payments/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
finalizers:
- resources-finalizer.argocd.argoproj.io
name: payments-prod
namespace: argocd
spec:
destination:
namespace: prod
server: https://kubernetes.default.svc
project: default
source:
helm:
parameters:
- name: image.repository
value: 424432388155.dkr.ecr.us-east-2.amazonaws.com/payments
- name: service.port
value: '8080'
- name: livenessProbe.httpGet.path
value: /healthz
- name: readinessProbe.httpGet.path
value: /healthz
- name: image.tag
value: 0.1.0
path: helm-charts/payments
repoURL: [email protected]:antonputra/k8s.git
targetRevision: main
syncPolicy:
automated:
allowEmpty: false
prune: true
selfHeal: true
syncOptions:
- Validate=true
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
39 changes: 39 additions & 0 deletions lessons/200/k8s-private-repo/envs/prod/users/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
finalizers:
- resources-finalizer.argocd.argoproj.io
name: users-prod
namespace: argocd
spec:
destination:
namespace: prod
server: https://kubernetes.default.svc
project: default
source:
helm:
parameters:
- name: image.repository
value: 424432388155.dkr.ecr.us-east-2.amazonaws.com/users
- name: service.port
value: '8080'
- name: livenessProbe.httpGet.path
value: /healthz
- name: readinessProbe.httpGet.path
value: /healthz
- name: image.tag
value: 0.1.0
path: helm-charts/users
repoURL: [email protected]:antonputra/k8s.git
targetRevision: main
syncPolicy:
automated:
allowEmpty: false
prune: true
selfHeal: true
syncOptions:
- Validate=true
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
Loading

0 comments on commit 6e2b2fe

Please sign in to comment.