Skip to content

Commit

Permalink
feat: add podAnnotations to the cronjob (#39)
Browse files Browse the repository at this point in the history
* feat: add podAnnotations to the cronjob

* fix: move annotations within the if statement
  • Loading branch information
xavidop authored Sep 20, 2022
1 parent f36fcbf commit acf2da8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.7.1
description: Deploys a cronJob which will renew ECR imagePullSecrets automatically
name: k8s-ecr-login-renew
version: 1.0.0
version: 1.0.1
maintainers:
- name: Nabeel Sulieman
url: https://nabeel.dev
Expand Down
4 changes: 4 additions & 0 deletions chart/templates/005-CronJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ spec:
spec:
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | trim | nindent 12 }}
{{- end }}
{{- if .Values.forHelm }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
Expand Down
3 changes: 3 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ aws:
secretKeys:
accessKeyId: 'AWS_ACCESS_KEY_ID'
secretAccessKey: 'AWS_SECRET_ACCESS_KEY'

# Pod annotations for the pods that are created by the cronjob
podAnnotations: {}

0 comments on commit acf2da8

Please sign in to comment.