argo: strongarm autosync to prevent further config drift

Commenting empty syncPolicy, otherwise argocd sees it as diff
This commit is contained in:
rasmus 2024-08-03 03:30:27 +03:00
parent 41da5931f9
commit 35404464f4
19 changed files with 120 additions and 20 deletions

View File

@ -74,7 +74,11 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: $j namespace: $j
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true
EOF EOF
done done
find applications -name "*.yaml" -exec kubectl apply -n argocd -f {} \; find applications -name "*.yaml" -exec kubectl apply -n argocd -f {} \;

View File

@ -2,16 +2,17 @@
apiVersion: argoproj.io/v1alpha1 apiVersion: argoproj.io/v1alpha1
kind: Application kind: Application
metadata: metadata:
name: whoami-oidc name: argocd-applications
namespace: argocd namespace: argocd
spec: spec:
project: k-space.ee project: k-space.ee
source: source:
repoURL: 'git@git.k-space.ee:k-space/kube.git' repoURL: 'git@git.k-space.ee:k-space/kube.git'
path: whoami-oidc path: argocd/applications
targetRevision: HEAD targetRevision: HEAD
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: whoami-oidc namespace: argocd
syncPolicy: syncPolicy:
automated: {} automated:
prune: false

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: asterisk namespace: asterisk
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: bind namespace: bind
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,3 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: camtiler namespace: camtiler
syncPolicy: {}

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: etherpad namespace: etherpad
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: freescout namespace: freescout
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: gitea namespace: gitea
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: grafana namespace: grafana
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: hackerspace namespace: hackerspace
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -0,0 +1,20 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kubernetes-dashboard
namespace: argocd
spec:
project: default
source:
repoURL: 'git@git.k-space.ee:k-space/kube.git'
path: kubernetes-dashboard
targetRevision: HEAD
destination:
server: 'https://kubernetes.default.svc'
namespace: kubernetes-dashboard
syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -0,0 +1,20 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: monitoring
namespace: argocd
spec:
project: k-space.ee
source:
repoURL: 'git@git.k-space.ee:k-space/kube.git'
path: monitoring
targetRevision: HEAD
destination:
server: 'https://kubernetes.default.svc'
namespace: monitoring
syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: nextcloud namespace: nextcloud
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: nyancat namespace: nyancat
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: rosdump namespace: rosdump
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: traefik namespace: traefik
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: wiki namespace: wiki
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: wildduck namespace: wildduck
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

View File

@ -13,4 +13,8 @@ spec:
destination: destination:
server: 'https://kubernetes.default.svc' server: 'https://kubernetes.default.svc'
namespace: woodpecker namespace: woodpecker
syncPolicy: {} syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true