Skip to content

Commit

Permalink
[daemons]: optional image registry
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Feb 25, 2025
1 parent a9e9876 commit 628179a
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion charts/rucio-daemons/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rucio-daemons
version: 36.0.3
version: 36.0.4
apiVersion: v1
description: A Helm chart to deploy daemons for Rucio
keywords:
Expand Down
10 changes: 10 additions & 0 deletions charts/rucio-daemons/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ Get CronJob Kube API Version
{{- print "batch/v1beta1" -}}
{{- end -}}
{{- end -}}

{{/*
Image Registry
Ensures the registry ends with a `/` if set.
*/}}
{{- define "rucio.image.registry" -}}
{{- if .Values.imageRegistry -}}
{{- trimSuffix "/" .Values.imageRegistry }}/
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/abacus-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce (.component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce (.component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
serviceAccountName: {{ template "rucio.fullname" . }}-rucio-restart
containers:
- name: restart-pods
image: "{{ .Values.automaticRestart.image.repository }}:{{ .Values.automaticRestart.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.automaticRestart.image.repository }}:{{ .Values.automaticRestart.image.tag }}"
imagePullPolicy: {{ .Values.automaticRestart.image.pullPolicy }}
args:
- rollout
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/automatix-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config-common
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/conveyor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce (.component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce (.component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/dark-reaper-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/hermes-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{ if $component_values.useSSL }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{ if $component_values.useSSL }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/judge-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce (.component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce (.component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/minos-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce (.component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce (.component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/necromancer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/reaper-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/renew-fts-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{{- end}}
containers:
- name: renew-fts-cron
image: "{{ .Values.ftsRenewal.image.repository }}:{{ .Values.ftsRenewal.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.ftsRenewal.image.repository }}:{{ .Values.ftsRenewal.image.tag }}"
imagePullPolicy: {{ .Values.ftsRenewal.image.pullPolicy }}
resources:
{{ toYaml .Values.ftsRenewal.resources | indent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config-common
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.useDeprecatedImplicitSecrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-daemons/templates/undertaker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ coalesce ($component_values.image | default dict).tag .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config-common
Expand Down
3 changes: 3 additions & 0 deletions charts/rucio-daemons/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ image:
imagePullSecrets: []
# - name: docker-regcreds

imageRegistry: ""
# imageRegistry: registry.cern.ch/docker.io

strategy:
type: RollingUpdate
rollingUpdate:
Expand Down

0 comments on commit 628179a

Please sign in to comment.