Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all]: optional image registry #233

Merged
merged 6 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion charts/rucio-probes/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: Helm chart for probe cron jobs needed in Rucio
name: rucio-probes
version: 36.0.0
version: 36.0.1
10 changes: 10 additions & 0 deletions charts/rucio-probes/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ Create chart name and version as used by the chart label.
{{- define "rucio-probes.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- 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-probes/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
- env:
- name: RUCIO_OVERRIDE_CONFIGS
value: "/opt/rucio/etc/conf.d/"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Chart.Name }}
volumeMounts:
Expand Down
3 changes: 3 additions & 0 deletions charts/rucio-probes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ image:
imagePullSecrets: []
# - name: docker-regcreds

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

# Values needed for some of the probes
probeSettings:
# This is the secret for the X509 proxy for FTS. Needed for "check_fts_backlog"
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rucio-server
version: 36.0.4
version: 36.0.5
apiVersion: v1
description: A Helm chart to deploy servers for Rucio
keywords:
Expand Down
10 changes: 10 additions & 0 deletions charts/rucio-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,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 -}}
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
6 changes: 3 additions & 3 deletions charts/rucio-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
containers:
{{- if .Values.exposeErrorLogs }}
- name: httpd-error-log
image: busybox
image: "{{ include "rucio.image.registry" . }}busybox"
args: [/bin/sh, -c, 'tail -n+1 -F /var/log/httpd/error_log']
volumeMounts:
- name: httpdlog
Expand All @@ -131,7 +131,7 @@ spec:
{{- end }}
{{- if .Values.monitoring.enabled }}
- name: apache-exporter
image: rucio/apache_exporter
image: "{{ include "rucio.image.registry" . }}rucio/apache_exporter"
{{- if .Values.useSSL }}
args: ['--telemetry.address=:{{ .Values.monitoring.exporterPort }}', '--scrape_uri=https://localhost/server-status/?auto', '--insecure']
{{ else }}
Expand All @@ -145,7 +145,7 @@ spec:
{{ toYaml .Values.metricsExporterResources | indent 12 }}
{{- end }}
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{ toYaml .Values.serverResources | indent 12 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-server/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 15 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/rucio-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ image:
imagePullSecrets: []
# - name: docker-regcreds

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

service:
type: ClusterIP
port: 80
Expand Down
2 changes: 1 addition & 1 deletion charts/rucio-ui/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rucio-ui
version: 36.0.0
version: 36.0.1
apiVersion: v1
description: A Helm chart to deploy webui servers for Rucio
keywords:
Expand Down
10 changes: 10 additions & 0 deletions charts/rucio-ui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ Get Ingress Kube API Version
{{- print "extensions/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 -}}
4 changes: 2 additions & 2 deletions charts/rucio-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ spec:
containers:
{{- if .Values.exposeErrorLogs }}
- name: httpd-error-log
image: busybox
image: "{{ include "rucio.image.registry" . }}busybox"
args: [/bin/sh, -c, 'tail -n+1 -F /var/log/httpd/error_log']
volumeMounts:
- name: httpdlog
mountPath: /var/log/httpd
{{- end }}
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ include "rucio.image.registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
Expand Down
3 changes: 3 additions & 0 deletions charts/rucio-ui/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
2 changes: 1 addition & 1 deletion charts/rucio-webui/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rucio-webui
version: 36.0.0
version: 36.0.1
apiVersion: v1
description: A Helm chart to deploy the new Rucio Webui
keywords:
Expand Down
10 changes: 10 additions & 0 deletions charts/rucio-webui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ Get Ingress Kube API Version
{{- print "extensions/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 -}}
Loading
Loading