diff --git a/jupyterhub/templates/image-puller/_helpers-daemonset.tpl b/jupyterhub/templates/image-puller/_helpers-daemonset.tpl index b787136a2b..7678b57259 100644 --- a/jupyterhub/templates/image-puller/_helpers-daemonset.tpl +++ b/jupyterhub/templates/image-puller/_helpers-daemonset.tpl @@ -25,6 +25,14 @@ metadata: "helm.sh/hook": pre-install,pre-upgrade "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded "helm.sh/hook-weight": "-10" + {{- with .Values.prePuller.hook.daemonsetAnnotations }} + {{- . | toYaml | nindent 4 }} + {{- end }} + {{- else }} + {{- with .Values.prePuller.continuous.daemonsetAnnotations }} + annotations: + {{- . | toYaml | nindent 4 }} + {{- end }} {{- end }} spec: selector: diff --git a/jupyterhub/values.schema.yaml b/jupyterhub/values.schema.yaml index d74d990cc6..206045bffe 100644 --- a/jupyterhub/values.schema.yaml +++ b/jupyterhub/values.schema.yaml @@ -2906,6 +2906,12 @@ properties: resources: *resources-spec serviceAccount: *serviceAccount serviceAccountImagePuller: *serviceAccount + daemonsetAnnotations: + type: object + additionalProperties: false + patternProperties: *labels-and-annotations-patternProperties + description: | + Annotations to apply to the hook image puller DaemonSet. continuous: type: object additionalProperties: false @@ -2923,6 +2929,12 @@ properties: enabled: type: boolean serviceAccount: *serviceAccount + daemonsetAnnotations: + type: object + additionalProperties: false + patternProperties: *labels-and-annotations-patternProperties + description: | + Annotations to apply to the continuous image puller DaemonSet. pullProfileListImages: type: boolean description: | diff --git a/jupyterhub/values.yaml b/jupyterhub/values.yaml index 5b79d6b36f..b2ed62882f 100644 --- a/jupyterhub/values.yaml +++ b/jupyterhub/values.yaml @@ -675,12 +675,14 @@ prePuller: create: true name: annotations: {} + daemonsetAnnotations: {} continuous: enabled: true serviceAccount: create: true name: annotations: {} + daemonsetAnnotations: {} pullProfileListImages: true extraImages: {} pause: diff --git a/tools/templates/lint-and-validate-values.yaml b/tools/templates/lint-and-validate-values.yaml index 921e756387..74fbc44d30 100644 --- a/tools/templates/lint-and-validate-values.yaml +++ b/tools/templates/lint-and-validate-values.yaml @@ -564,9 +564,11 @@ prePuller: effect: NoSchedule serviceAccount: *serviceAccount serviceAccountImagePuller: *serviceAccount + daemonsetAnnotations: *annotations continuous: enabled: true serviceAccount: *serviceAccount + daemonsetAnnotations: *annotations extraImages: mockImage1: name: mock-user/mock-image1