Skip to content

Commit

Permalink
Add ability to attach custom pod labels (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
torchello authored Aug 14, 2024
1 parent df57a2b commit 6147d9d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sickhub/cronjobs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cronjobs
description: A generic helm cronjob chart for kubernetes
type: application
version: 0.3.0
version: 0.4.0
appVersion: latest
home: https://github.com/SickHub
icon: https://raw.githubusercontent.com/SickHub/charts/master/sickhub/cronjobs/icon.png
Expand Down
5 changes: 5 additions & 0 deletions sickhub/cronjobs/ci/scripts-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ configMaps:
files:
example.sh: ci/files/example.sh

podAnnotations:
testAnnotation: value
potLabels:
testLabel: value

jobs:
start:
schedule: "* * * * *"
Expand Down
3 changes: 3 additions & 0 deletions sickhub/cronjobs/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
labels:
{{- with .podLabels }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- $chart_selector_labels | nindent 12 }}
spec:
restartPolicy: {{ default "Never" .restartPolicy }}
Expand Down
1 change: 1 addition & 0 deletions sickhub/cronjobs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ clusterrole:
# verbs: ["list", "get", "watch", "create", "update", "patch", "delete"]

podAnnotations: {}
podLabels: {}

podSecurityContext: {}
# fsGroup: 2000
Expand Down

0 comments on commit 6147d9d

Please sign in to comment.