Skip to content

Commit

Permalink
add argocd annotations to get around finalizer deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
rteeling-evernorth committed Apr 24, 2024
1 parent 49490c4 commit 978eae5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ metadata:
{{- if and (ne $containerMode.type "kubernetes") (not .Values.template.spec.serviceAccountName) }}
actions.github.com/cleanup-no-permission-service-account-name: {{ include "gha-runner-scale-set.noPermissionServiceAccountName" . }}
{{- end }}
argocd.argoproj.io/sync-wave: "1"
spec:
githubConfigUrl: {{ required ".Values.githubConfigUrl is required" (trimSuffix "/" .Values.githubConfigUrl) }}
githubConfigSecret: {{ include "gha-runner-scale-set.githubsecret" . }}
Expand Down
2 changes: 2 additions & 0 deletions charts/gha-runner-scale-set/templates/kube_mode_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ kind: Role
metadata:
name: {{ include "gha-runner-scale-set.kubeModeRoleName" . }}
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/sync-options: Delete=false
finalizers:
- actions.github.com/cleanup-protection
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ kind: RoleBinding
metadata:
name: {{ include "gha-runner-scale-set.kubeModeRoleBindingName" . }}
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/sync-options: Delete=false
finalizers:
- actions.github.com/cleanup-protection
roleRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ metadata:
{{- with .Values.containerMode.kubernetesModeServiceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
argocd.argoproj.io/sync-options: Delete=false
{{- end }}
annotations:
argocd.argoproj.io/sync-options: Delete=false
{{- end }}
finalizers:
- actions.github.com/cleanup-protection
Expand Down
2 changes: 2 additions & 0 deletions charts/gha-runner-scale-set/templates/manager_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Role
metadata:
name: {{ include "gha-runner-scale-set.managerRoleName" . }}
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/sync-options: Delete=false
labels:
{{- include "gha-runner-scale-set.labels" . | nindent 4 }}
app.kubernetes.io/component: manager-role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: RoleBinding
metadata:
name: {{ include "gha-runner-scale-set.managerRoleBindingName" . }}
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/sync-options: Delete=false
labels:
{{- include "gha-runner-scale-set.labels" . | nindent 4 }}
app.kubernetes.io/component: manager-role-binding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ kind: ServiceAccount
metadata:
name: {{ include "gha-runner-scale-set.noPermissionServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/sync-options: Delete=false
labels:
{{- include "gha-runner-scale-set.labels" . | nindent 4 }}
finalizers:
Expand Down

0 comments on commit 978eae5

Please sign in to comment.