Skip to content

Commit 7b16184

Browse files
authored
feat: mount self signed certs from configmaps (#4472)
Currently we only support secrets. But in a lot of cases you can create a configmap, annotate it and then k8s will populate it with cluster-specific CA certs. This is an option for the internal image registry that comes with openshift. And the auto-population with the cert works only on configmaps, not on secrets.
1 parent d63c483 commit 7b16184

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

helm-chart/renku/templates/_certificates-volumes.tpl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
path: {{ include "renku.CASecretName" . }}-internal-communication-ca.crt
1515
{{- if $customCAsEnabled }}
1616
{{- range $customCA := .Values.global.certificates.customCAs }}
17+
{{- if $customCA.secret }}
1718
- secret:
1819
name: {{ $customCA.secret }}
19-
{{- end -}}
20-
{{- end -}}
21-
{{- end -}}
20+
{{- else if $customCA.configMap }}
21+
- configMap:
22+
name: {{ $customCA.configMap }}
23+
{{- end }}
24+
{{- end }}
25+
{{- end }}
26+
{{- end }}

helm-chart/renku/values.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,19 @@ global:
134134
anonymousSessions:
135135
## Set to true to enable anonymous sessions
136136
enabled: false
137-
## Specify the name of an existing K8s secret that contains the certificate
137+
## Specify the name of an existing K8s secret or configmap that contains the certificate
138138
## if you would like to use a custom CA. The key for the secret
139139
## should have the .crt extension otherwise it is ignored. The
140-
## keys across all secrets are mounted as files in one location so
140+
## keys across all secrets and configmaps are mounted as files in one location so
141141
## the keys across all secrets have to be unique. In addition to the
142142
## changes here modifications need to be made in the keycloak section below
143143
certificates:
144144
image:
145145
repository: renku/certificates
146146
tag: "0.0.2"
147147
customCAs: []
148-
# - secret:
148+
# - secret: a-secret-name
149+
# - configMap: a-configmap-name
149150
## Database credentials for postgres
150151
db:
151152
## Used by the renku-data-services and potentially other backend services
@@ -291,10 +292,15 @@ keycloakx:
291292
defaultMode: 0777
292293
sources:
293294
{{- range $customCA := .Values.global.certificates.customCAs }}
295+
{{- if $customCA.secret }}
294296
- secret:
295297
name: {{ $customCA.secret }}
296-
{{- end -}}
297-
{{- end -}}
298+
{{- else if $customCA.configMap }}
299+
- configMap:
300+
name: {{ $customCA.configMap }}
301+
{{- end }}
302+
{{- end }}
303+
{{- end }}
298304
## Create a demo user in keycloak? Note that the password for the demo
299305
## user must be queried from kubernetes (see the rendered NOTES.txt
300306
## template which is shown after a successful deployment).
@@ -823,8 +829,7 @@ dlf-chart:
823829
enabled: false
824830
dataset-operator-chart:
825831
enabled: true
826-
csi-rclone:
827-
{}
832+
csi-rclone: {}
828833
# This section is only relevant if you are installing csi-rclone as part of Renku
829834
## Name of the csi storage class to use for RClone/Cloudstorage. Should be unique per cluster.
830835
# storageClassName: csi-rclone
@@ -1256,8 +1261,7 @@ dataService:
12561261
## The name of the BuildStrategy to use for image builds.
12571262
strategyName: renku-buildpacks-v3
12581263
## Configuration overrides for specific target platforms
1259-
platformOverrides:
1260-
{}
1264+
platformOverrides: {}
12611265
# linux/arm64:
12621266
# builderImage: "ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/cuda-selector:0.5.1"
12631267
# runImage: "ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/cuda-run-image:0.5.1"

0 commit comments

Comments
 (0)