Skip to content

Commit

Permalink
Update ace chart cleaner job (#541)
Browse files Browse the repository at this point in the history
- Rename ace check job to cleaner
- Delete both successful and failed ace jobs

Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Oct 25, 2024
1 parent 7282974 commit c4f7fc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "ace.fullname" . }}-check
name: {{ include "ace.fullname" . }}-cleaner
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook-weight": "0"
Expand All @@ -13,7 +13,7 @@ spec:
template:
spec:
{{- include "appscode.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ include "appscode.serviceAccountName" . }}-check
serviceAccountName: {{ include "appscode.serviceAccountName" . }}-cleaner
automountServiceAccountToken: true
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
Expand All @@ -28,8 +28,6 @@ spec:
- delete
- jobs
- --namespace={{ .Release.Namespace }}
- --field-selector
- status.successful=0
- --selector
- app.kubernetes.io/instance=ace
resources:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "ace.fullname" . }}-check
name: {{ include "ace.fullname" . }}-cleaner
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook-weight": "0"
Expand All @@ -20,7 +20,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "ace.fullname" . }}-check
name: {{ include "ace.fullname" . }}-cleaner
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook-weight": "0"
Expand All @@ -29,8 +29,8 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "ace.fullname" . }}-check
name: {{ include "ace.fullname" . }}-cleaner
subjects:
- kind: ServiceAccount
name: {{ include "appscode.serviceAccountName" . }}-check
name: {{ include "appscode.serviceAccountName" . }}-cleaner
namespace: {{ .Release.Namespace }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "appscode.serviceAccountName" . }}-check
name: {{ include "appscode.serviceAccountName" . }}-cleaner
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook-weight": "0"
Expand Down

0 comments on commit c4f7fc5

Please sign in to comment.