Skip to content

Commit

Permalink
adjust external secrets for argocd (#727)
Browse files Browse the repository at this point in the history
* server side apply argocd

* adjust external secret for reconcile and remove sleep job

* removing extra ServerSideApply true

* add argocd application to all stacks

---------

Co-authored-by: John Dietz <[email protected]>
  • Loading branch information
jarededwards and johndietz authored Mar 20, 2024
1 parent 1afc01d commit 3b8bbcf
Show file tree
Hide file tree
Showing 36 changed files with 282 additions and 208 deletions.
23 changes: 23 additions & 0 deletions akamai-github/templates/mgmt/components/argocd/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd-kustomized-app
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argocd
name: in-cluster
project: default
source:
path: registry/clusters/<CLUSTER_NAME>/components/argocd
repoURL: '<GITOPS_REPO_URL>'
targetRevision: HEAD
kustomize:
forceCommonLabels: true
forceCommonAnnotations: true
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,3 @@ spec:
- kubectl -n argocd rollout restart deployment/argocd-server
restartPolicy: OnFailure
serviceAccountName: argocd-oidc-restart-job
---
apiVersion: batch/v1
kind: Job
metadata:
annotations:
argocd.argoproj.io/sync-wave: '120'
argocd.argoproj.io/hook: PostSync
name: argocd-sleep-after-restart
namespace: argocd
spec:
template:
spec:
containers:
- name: argocd-sleep-after-restart-job
image: public.ecr.aws/bitnami/kubectl:1.24
command:
- /bin/sh
- -c
- "sleep 120"
restartPolicy: OnFailure
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ spec:
refreshInterval: 10s
data:
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_secret
secretKey: clientSecret
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_id
secretKey: clientId
23 changes: 23 additions & 0 deletions aws-github/templates/mgmt/components/argocd/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd-kustomized-app
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argocd
name: in-cluster
project: default
source:
path: registry/clusters/<CLUSTER_NAME>/components/argocd
repoURL: '<GITOPS_REPO_URL>'
targetRevision: HEAD
kustomize:
forceCommonLabels: true
forceCommonAnnotations: true
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,3 @@ spec:
- kubectl -n argocd rollout restart deployment/argocd-server
restartPolicy: OnFailure
serviceAccountName: argocd-oidc-restart-job
---
apiVersion: batch/v1
kind: Job
metadata:
annotations:
argocd.argoproj.io/sync-wave: '120'
argocd.argoproj.io/hook: PostSync
name: argocd-sleep-after-restart
namespace: argocd
spec:
template:
spec:
containers:
- name: argocd-sleep-after-restart-job
image: public.ecr.aws/bitnami/kubectl:1.24
command:
- /bin/sh
- -c
- "sleep 120"
restartPolicy: OnFailure
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ spec:
refreshInterval: 10s
data:
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_secret
secretKey: clientSecret
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_id
secretKey: clientId
23 changes: 23 additions & 0 deletions aws-gitlab/templates/mgmt/components/argocd/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd-kustomized-app
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argocd
name: in-cluster
project: default
source:
path: registry/clusters/<CLUSTER_NAME>/components/argocd
repoURL: '<GITOPS_REPO_URL>'
targetRevision: HEAD
kustomize:
forceCommonLabels: true
forceCommonAnnotations: true
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,3 @@ spec:
- kubectl -n argocd rollout restart deployment/argocd-server
restartPolicy: OnFailure
serviceAccountName: argocd-oidc-restart-job
---
apiVersion: batch/v1
kind: Job
metadata:
annotations:
argocd.argoproj.io/sync-wave: '120'
argocd.argoproj.io/hook: PostSync
name: argocd-sleep-after-restart
namespace: argocd
spec:
template:
spec:
containers:
- name: argocd-sleep-after-restart-job
image: public.ecr.aws/bitnami/kubectl:1.24
command:
- /bin/sh
- -c
- "sleep 120"
restartPolicy: OnFailure
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ spec:
refreshInterval: 10s
data:
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_secret
secretKey: clientSecret
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_id
secretKey: clientId
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ spec:
- kubectl -n argocd rollout restart deployment/argocd-server
restartPolicy: OnFailure
serviceAccountName: argocd-oidc-restart-job

Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ spec:
refreshInterval: 10s
data:
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_secret
secretKey: clientSecret
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_id
secretKey: clientId
23 changes: 23 additions & 0 deletions civo-gitlab/templates/mgmt/components/argocd/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd-kustomized-app
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argocd
name: in-cluster
project: default
source:
path: registry/clusters/<CLUSTER_NAME>/components/argocd
repoURL: '<GITOPS_REPO_URL>'
targetRevision: HEAD
kustomize:
forceCommonLabels: true
forceCommonAnnotations: true
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,3 @@ spec:
- kubectl -n argocd rollout restart deployment/argocd-server
restartPolicy: OnFailure
serviceAccountName: argocd-oidc-restart-job
---
apiVersion: batch/v1
kind: Job
metadata:
annotations:
argocd.argoproj.io/sync-wave: '120'
argocd.argoproj.io/hook: PostSync
name: argocd-sleep-after-restart
namespace: argocd
spec:
template:
spec:
containers:
- name: argocd-sleep-after-restart-job
image: public.ecr.aws/bitnami/kubectl:1.24
command:
- /bin/sh
- -c
- "sleep 120"
restartPolicy: OnFailure
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ spec:
refreshInterval: 10s
data:
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_secret
secretKey: clientSecret
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_id
secretKey: clientId
2 changes: 0 additions & 2 deletions digitalocean-github/templates/mgmt/argocd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ spec:
server: 'https://kubernetes.default.svc'
namespace: argocd
syncPolicy:
syncOptions:
- ServerSideApply=true
automated:
prune: true
selfHeal: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd-kustomized-app
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argocd
name: in-cluster
project: default
source:
path: registry/clusters/<CLUSTER_NAME>/components/argocd
repoURL: '<GITOPS_REPO_URL>'
targetRevision: HEAD
kustomize:
forceCommonLabels: true
forceCommonAnnotations: true
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,3 @@ spec:
- kubectl -n argocd rollout restart deployment/argocd-server
restartPolicy: OnFailure
serviceAccountName: argocd-oidc-restart-job
---
apiVersion: batch/v1
kind: Job
metadata:
annotations:
argocd.argoproj.io/sync-wave: '120'
argocd.argoproj.io/hook: PostSync
name: argocd-sleep-after-restart
namespace: argocd
spec:
template:
spec:
containers:
- name: argocd-sleep-after-restart-job
image: public.ecr.aws/bitnami/kubectl:1.24
command:
- /bin/sh
- -c
- "sleep 120"
restartPolicy: OnFailure
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ spec:
refreshInterval: 10s
data:
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_secret
secretKey: clientSecret
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_id
secretKey: clientId
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd-kustomized-app
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argocd
name: in-cluster
project: default
source:
path: registry/clusters/<CLUSTER_NAME>/components/argocd
repoURL: '<GITOPS_REPO_URL>'
targetRevision: HEAD
kustomize:
forceCommonLabels: true
forceCommonAnnotations: true
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,3 @@ spec:
- kubectl -n argocd rollout restart deployment/argocd-server
restartPolicy: OnFailure
serviceAccountName: argocd-oidc-restart-job
---
apiVersion: batch/v1
kind: Job
metadata:
annotations:
argocd.argoproj.io/sync-wave: '120'
argocd.argoproj.io/hook: PostSync
name: argocd-sleep-after-restart
namespace: argocd
spec:
template:
spec:
containers:
- name: argocd-sleep-after-restart-job
image: public.ecr.aws/bitnami/kubectl:1.24
command:
- /bin/sh
- -c
- "sleep 120"
restartPolicy: OnFailure
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ spec:
refreshInterval: 10s
data:
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_secret
secretKey: clientSecret
- remoteRef:
conversionStrategy: Default
key: oidc/argocd
property: client_id
secretKey: clientId
Loading

0 comments on commit 3b8bbcf

Please sign in to comment.