Skip to content

Commit

Permalink
[server]: optional image registry
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Feb 24, 2025
1 parent 1cdebd6 commit 2bc43af
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
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.1
version: 36.0.3
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: {{ .Release.Name }}-{{ template "rucio.name" . }}-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 @@ -90,7 +90,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 @@ -100,7 +100,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 @@ -114,7 +114,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

0 comments on commit 2bc43af

Please sign in to comment.