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

feat: Add support to pull CA Certs from configMap #255

Merged
merged 4 commits into from
Nov 14, 2024
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/operator-wandb/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ dependencies:
repository: file://charts/yace
version: 0.1.0
digest: sha256:bca2b6781737da6806e4485605cf9ce87b1428944b14cb88f082024cc3500bbd
generated: "2024-10-09T17:53:33.992+05:30"
generated: "2024-11-08T13:07:42.344971+05:30"
2 changes: 1 addition & 1 deletion charts/operator-wandb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: operator-wandb
description: A Helm chart for deploying W&B to Kubernetes
type: application
version: 0.18.14
version: 0.18.15
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
13 changes: 12 additions & 1 deletion charts/operator-wandb/charts/app/templates/_deployment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,17 @@ spec:
mountPath: /etc/ssl/certs/redis_ca.pem
subPath: redis_ca.pem
{{- end }}
{{- if .Values.global.caCertsConfigMap }}
- name: wandb-ca-certs-user
mountPath: /usr/local/share/ca-certificates/
{{- end }}
{{- if .Values.global.customCACerts }}
{{- range $index, $v := .Values.global.customCACerts }}
- name: wandb-ca-certs
mountPath: /usr/local/share/ca-certificates/customCA{{$index}}.crt
subPath: customCA{{$index}}.crt
{{- end }}
{{- end }}
ports:
- name: http
containerPort: 8080
Expand Down Expand Up @@ -300,9 +306,14 @@ spec:
- key: REDIS_CA_CERT
path: redis_ca.pem
{{- end }}
{{- if .Values.global.caCertsConfigMap }}
- name: wandb-ca-certs-user
configMap:
name: {{ .Values.global.caCertsConfigMap }}
{{- end }}
{{- if .Values.global.customCACerts }}
- name: wandb-ca-certs
configMap:
name: {{ include "wandb.fullname" . }}-ca-certs
{{- end }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/operator-wandb/charts/parquet/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.global.customCACerts }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "parquet.fullname" . }}-ca-certs
labels:
{{- include "wandb.labels" . | nindent 4 }}
data:
{{- range $index, $pem := .Values.global.customCACerts }}
customCA{{$index}}.crt: |-
{{- range splitList "\n" $pem }}
{{ . }}
{{- end }}
{{- end }}
{{- end }}
21 changes: 21 additions & 0 deletions charts/operator-wandb/charts/parquet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ spec:
mountPath: /etc/ssl/certs/redis_ca.pem
subPath: redis_ca.pem
{{- end }}
{{- if .Values.global.caCertsConfigMap }}
- name: wandb-ca-certs-user
mountPath: /usr/local/share/ca-certificates/
{{- end }}
{{- if .Values.global.customCACerts }}
{{- range $index, $v := .Values.global.customCACerts }}
- name: wandb-ca-certs
mountPath: /usr/local/share/ca-certificates/customCA{{$index}}.crt
subPath: customCA{{$index}}.crt
{{- end }}
{{- end }}
ports:
- name: parquet
containerPort: 8087
Expand Down Expand Up @@ -154,4 +165,14 @@ spec:
- key: REDIS_CA_CERT
path: redis_ca.pem
{{- end }}
{{- if .Values.global.caCertsConfigMap }}
- name: wandb-ca-certs-user
configMap:
name: {{ .Values.global.caCertsConfigMap }}
{{- end }}
{{- if .Values.global.customCACerts }}
- name: wandb-ca-certs
configMap:
name: {{ include "parquet.fullname" . }}-ca-certs
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,19 @@ global:
# If the topic already exists then changing the number of partitions is not possible.
runUpdatesShadowNumPartitions: 12

# To provide custom CA certificates, you can use either:
# 1. `customCACerts`: a list of certificates provided directly within this Helm chart.
# 2. `configMapName`: the name of a ConfigMap containing CA certificates.
#
# Important:
# - If using a ConfigMap, each key in the ConfigMap must end with `.crt` (e.g., `my-cert.crt`).
# - This naming convention is required for `update-ca-certificates` to parse and add each
# certificate to the system CA store on Ubuntu-based systems.

# List of custom CA certificates in PEM format.
customCACerts: []
# Name of a ConfigMap containing additional .crt files for CA certificates.
caCertsConfigMap: ""

weave-trace:
enabled: false
Expand Down
Loading