From af81f581c0295104048f0f99b034c6431a20050a Mon Sep 17 00:00:00 2001 From: Aditya Choudhari <48932219+adityachoudhari26@users.noreply.github.com> Date: Wed, 28 Feb 2024 20:05:13 -0800 Subject: [PATCH] wandb chart config map (#83) Co-authored-by: Justin Brooks --- charts/operator/Chart.yaml | 2 +- charts/operator/templates/configmap.yaml | 8 ++++++++ charts/operator/templates/deployment.yaml | 13 +++++++++++++ charts/operator/values.yaml | 3 +++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 charts/operator/templates/configmap.yaml diff --git a/charts/operator/Chart.yaml b/charts/operator/Chart.yaml index d40ee245..2e792e67 100644 --- a/charts/operator/Chart.yaml +++ b/charts/operator/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator description: A Helm chart for Weights & Biases operator type: application -version: 1.1.0 +version: 1.1.1 appVersion: "1.0.0" maintainers: - name: wandb diff --git a/charts/operator/templates/configmap.yaml b/charts/operator/templates/configmap.yaml new file mode 100644 index 00000000..c47489ca --- /dev/null +++ b/charts/operator/templates/configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "name" . }}-charts +data: + {{- range $name, $chart := .Values.charts }} + {{ $name }}.b64: {{ $.Files.Get $chart.path | b64enc }} + {{- end }} diff --git a/charts/operator/templates/deployment.yaml b/charts/operator/templates/deployment.yaml index 1f911d70..41ea132b 100644 --- a/charts/operator/templates/deployment.yaml +++ b/charts/operator/templates/deployment.yaml @@ -42,6 +42,8 @@ spec: valueFrom: fieldRef: fieldPath: spec.serviceAccountName + - name: AIRGAPPED + value: {{ .Values.airgapped | quote }} livenessProbe: httpGet: path: /healthz @@ -55,6 +57,11 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 10 }} + {{- if .Values.airgapped }} + volumeMounts: + - name: {{ include "name" . }}-charts + mountPath: /charts + {{- end }} - args: - --secure-listen-address=0.0.0.0:8443 - --upstream=http://127.0.0.1:8080/ @@ -66,5 +73,11 @@ spec: - containerPort: 8443 name: https protocol: TCP + {{- if .Values.airgapped }} + volumes: + - name: {{ include "name" . }}-charts + configMap: + name: {{ include "name" . }}-charts + {{- end }} serviceAccountName: {{ include "manager.serviceAccount.name" . }} terminationGracePeriodSeconds: 10 diff --git a/charts/operator/values.yaml b/charts/operator/values.yaml index 438fe6c7..d7f7922d 100644 --- a/charts/operator/values.yaml +++ b/charts/operator/values.yaml @@ -32,3 +32,6 @@ clusterRole: - apiGroups: ["*"] resources: ["*"] verbs: ["*"] + +airgapped: false +charts: {}