Skip to content

Commit 2eddfc4

Browse files
authored
feat: allow per-image registry type overrides for all diracx images (#239)
Convert services, client, secret_generation, and diracx_base_image from flat strings to nested objects with repository (and optional registryType), matching the existing busybox/web pattern. This enables downstream charts to override the registry for individual images without affecting others.
1 parent cd084b0 commit 2eddfc4

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

diracx/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type: application
1111
# This is the chart version. This version number should be incremented each time you make changes
1212
# to the chart and its templates, including the app version.
1313
# Versions are expected to follow Semantic Versioning (https://semver.org/)
14-
version: "1.0.13"
14+
version: "1.0.14"
1515

1616
# This is the version number of the application being deployed. This version number should be
1717
# incremented each time you make changes to the application. Versions are not expected to

diracx/templates/diracx/_helpers_images.tpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ If tag, is not specified, it is taken from global images tag, defaulting to Char
1212
1313
Can be used as follows:
1414
15-
{{ include "diracx.image" (dict "registryType" "ghcr" "repository" .Values.global.images.services "root" . ) }}
15+
{{ include "diracx.image" (dict "registryType" .Values.global.images.services.registryType "repository" .Values.global.images.services.repository "root" . ) }}
1616
1717
Or
1818
19-
{{ include "diracx.image" (dict "repository" .Values.global.images.client "root" . ) }}
19+
{{ include "diracx.image" (dict "repository" .Values.global.images.client.repository "root" . ) }}
2020
21-
to produce an image path such as (assuming `.Values.global.images.ghcr_registry` is `ghcr.io` and `.Values.global.images.services` is `diracgrid/diracx/services`):
21+
to produce an image path such as (assuming `.Values.global.images.ghcr_registry` is `ghcr.io` and `.Values.global.images.services.repository` is `diracgrid/diracx/services`):
2222
2323
ghcr.io/diracgrid/diracx/services:v0.0.7
2424
@@ -52,31 +52,31 @@ Generates the diracx base image path
5252
*/}}
5353

5454
{{- define "diracx.baseImage" }}
55-
{{- include "diracx.image" (dict "repository" .Values.global.images.diracx_base_image "root" . ) }}
55+
{{- include "diracx.image" (dict "registryType" .Values.global.images.diracx_base_image.registryType "repository" .Values.global.images.diracx_base_image.repository "root" . ) }}
5656
{{- end }}
5757

5858

5959
{{/*
6060
Generates the services image path
6161
*/}}
6262
{{- define "diracx.servicesImage" }}
63-
{{- include "diracx.image" (dict "repository" .Values.global.images.services "root" . ) }}
63+
{{- include "diracx.image" (dict "registryType" .Values.global.images.services.registryType "repository" .Values.global.images.services.repository "root" . ) }}
6464
{{- end }}
6565

6666

6767
{{/*
6868
Generates the client image path
6969
*/}}
7070
{{- define "diracx.clientImage" }}
71-
{{- include "diracx.image" (dict "repository" .Values.global.images.client "root" . ) }}
71+
{{- include "diracx.image" (dict "registryType" .Values.global.images.client.registryType "repository" .Values.global.images.client.repository "root" . ) }}
7272
{{- end }}
7373

7474

7575
{{/*
7676
Generates the secret generation image path
7777
*/}}
7878
{{- define "diracx.secretGenerationImage" }}
79-
{{- include "diracx.image" (dict "repository" .Values.global.images.secret_generation "root" . "tag" "latest" ) }}
79+
{{- include "diracx.image" (dict "registryType" .Values.global.images.secret_generation.registryType "repository" .Values.global.images.secret_generation.repository "root" . "tag" "latest" ) }}
8080
{{- end }}
8181

8282
{{/*

diracx/values.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ global:
2323
dockerhub_registry: docker.io
2424

2525
# Image repositories
26-
services: diracgrid/diracx/services
27-
client: diracgrid/diracx/client
28-
secret_generation: diracgrid/diracx/secret-generation
29-
diracx_base_image: diracgrid/diracx/base
26+
services:
27+
repository: diracgrid/diracx/services
28+
client:
29+
repository: diracgrid/diracx/client
30+
secret_generation:
31+
repository: diracgrid/diracx/secret-generation
32+
diracx_base_image:
33+
repository: diracgrid/diracx/base
3034

3135
busybox:
3236
tag: "latest"

docs/admin/reference/values.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@
9494
| global.images.busybox.registryType | string | `"dockerhub"` | |
9595
| global.images.busybox.repository | string | `"busybox"` | |
9696
| global.images.busybox.tag | string | `"latest"` | |
97-
| global.images.client | string | `"diracgrid/diracx/client"` | |
98-
| global.images.diracx_base_image | string | `"diracgrid/diracx/base"` | |
97+
| global.images.client.repository | string | `"diracgrid/diracx/client"` | |
98+
| global.images.diracx_base_image.repository | string | `"diracgrid/diracx/base"` | |
9999
| global.images.dockerhub_registry | string | `"docker.io"` | |
100100
| global.images.ghcr_registry | string | `"ghcr.io"` | |
101-
| global.images.secret_generation | string | `"diracgrid/diracx/secret-generation"` | |
102-
| global.images.services | string | `"diracgrid/diracx/services"` | |
101+
| global.images.secret_generation.repository | string | `"diracgrid/diracx/secret-generation"` | |
102+
| global.images.services.repository | string | `"diracgrid/diracx/services"` | |
103103
| global.images.tag | string | `"v0.0.10"` | |
104104
| global.images.web.repository | string | `"diracgrid/diracx-web/static"` | |
105105
| global.images.web.tag | string | `"v0.1.0-a10"` | |

0 commit comments

Comments
 (0)