From fa070ef1060987460bdb165231712b79faf4ec56 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Fri, 6 Oct 2023 15:09:20 -0400 Subject: [PATCH 1/8] fix: Add app permissions to create secrets (#35) --- charts/operator-wandb/Chart.yaml | 2 +- .../charts/app/templates/deployment.yaml | 6 + .../charts/app/templates/role.yaml | 23 ++++ .../charts/app/templates/rolebinding.yaml | 23 ++++ .../app}/templates/serviceaccount.yaml | 6 +- charts/operator-wandb/charts/app/values.yaml | 4 + .../operator-wandb/old/prometheus/.helmignore | 23 ---- .../operator-wandb/old/prometheus/Chart.yaml | 25 ---- .../operator-wandb/old/prometheus/README.md | 87 ------------- .../charts/mysql-exporter/.helmignore | 23 ---- .../charts/mysql-exporter/Chart.yaml | 15 --- .../charts/mysql-exporter/README.md | 87 ------------- .../mysql-exporter/templates/_helpers.tpl | 123 ------------------ .../mysql-exporter/templates/deployment.yaml | 99 -------------- .../mysql-exporter/templates/service.yaml | 26 ---- .../charts/mysql-exporter/values.yaml | 47 ------- .../charts/node-exporter/.helmignore | 23 ---- .../charts/node-exporter/Chart.yaml | 15 --- .../prometheus/charts/node-exporter/README.md | 87 ------------- .../node-exporter/templates/_helpers.tpl | 123 ------------------ .../node-exporter/templates/damenset.yaml | 86 ------------ .../node-exporter/templates/service.yaml | 27 ---- .../charts/node-exporter/values.yaml | 47 ------- .../charts/redis-exporter/.helmignore | 23 ---- .../charts/redis-exporter/Chart.yaml | 15 --- .../charts/redis-exporter/README.md | 87 ------------- .../redis-exporter/templates/_helpers.tpl | 123 ------------------ .../redis-exporter/templates/deployment.yaml | 99 -------------- .../redis-exporter/templates/service.yaml | 26 ---- .../charts/redis-exporter/values.yaml | 47 ------- .../old/prometheus/templates/_helpers.tpl | 91 ------------- .../old/prometheus/templates/clusterrole.yaml | 37 ------ .../old/prometheus/templates/configmap.yaml | 93 ------------- .../old/prometheus/templates/deployment.yaml | 83 ------------ .../old/prometheus/templates/pvc.yaml | 16 --- .../old/prometheus/templates/service.yaml | 23 ---- .../operator-wandb/old/prometheus/values.yaml | 63 --------- 37 files changed, 60 insertions(+), 1793 deletions(-) create mode 100644 charts/operator-wandb/charts/app/templates/role.yaml create mode 100644 charts/operator-wandb/charts/app/templates/rolebinding.yaml rename charts/operator-wandb/{old/prometheus => charts/app}/templates/serviceaccount.yaml (72%) delete mode 100644 charts/operator-wandb/old/prometheus/.helmignore delete mode 100644 charts/operator-wandb/old/prometheus/Chart.yaml delete mode 100644 charts/operator-wandb/old/prometheus/README.md delete mode 100644 charts/operator-wandb/old/prometheus/charts/mysql-exporter/.helmignore delete mode 100644 charts/operator-wandb/old/prometheus/charts/mysql-exporter/Chart.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/mysql-exporter/README.md delete mode 100644 charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/_helpers.tpl delete mode 100644 charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/deployment.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/service.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/mysql-exporter/values.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/node-exporter/.helmignore delete mode 100644 charts/operator-wandb/old/prometheus/charts/node-exporter/Chart.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/node-exporter/README.md delete mode 100644 charts/operator-wandb/old/prometheus/charts/node-exporter/templates/_helpers.tpl delete mode 100644 charts/operator-wandb/old/prometheus/charts/node-exporter/templates/damenset.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/node-exporter/templates/service.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/node-exporter/values.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/redis-exporter/.helmignore delete mode 100644 charts/operator-wandb/old/prometheus/charts/redis-exporter/Chart.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/redis-exporter/README.md delete mode 100644 charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/_helpers.tpl delete mode 100644 charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/deployment.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/service.yaml delete mode 100644 charts/operator-wandb/old/prometheus/charts/redis-exporter/values.yaml delete mode 100644 charts/operator-wandb/old/prometheus/templates/_helpers.tpl delete mode 100644 charts/operator-wandb/old/prometheus/templates/clusterrole.yaml delete mode 100644 charts/operator-wandb/old/prometheus/templates/configmap.yaml delete mode 100644 charts/operator-wandb/old/prometheus/templates/deployment.yaml delete mode 100644 charts/operator-wandb/old/prometheus/templates/pvc.yaml delete mode 100644 charts/operator-wandb/old/prometheus/templates/service.yaml delete mode 100644 charts/operator-wandb/old/prometheus/values.yaml diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index e2e2e564..b61b03b7 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.13 +version: 0.10.14 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/app/templates/deployment.yaml b/charts/operator-wandb/charts/app/templates/deployment.yaml index 5936e927..8e317321 100644 --- a/charts/operator-wandb/charts/app/templates/deployment.yaml +++ b/charts/operator-wandb/charts/app/templates/deployment.yaml @@ -34,6 +34,7 @@ spec: {{- toYaml .Values.pod.annotations | nindent 4 }} {{- end }} spec: + serviceAccountName: {{ include "app.fullname" . }} {{- if .tolerations }} tolerations: {{- toYaml .tolerations | nindent 8 }} @@ -175,6 +176,11 @@ spec: name: "{{ include "wandb.bucket.secret" . }}" key: ACCESS_KEY optional: true + + - name: GORILLA_CUSTOMER_SECRET_STORE_K8S_CONFIG_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace {{- include "app.extraEnv" (dict "global" $.Values.global "local" .Values) | nindent 12 }} {{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} diff --git a/charts/operator-wandb/charts/app/templates/role.yaml b/charts/operator-wandb/charts/app/templates/role.yaml new file mode 100644 index 00000000..11bd36d3 --- /dev/null +++ b/charts/operator-wandb/charts/app/templates/role.yaml @@ -0,0 +1,23 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "app.fullname" . }} + namespace: {{ $.Release.Namespace }} + labels: + {{- include "wandb.commonLabels" . | nindent 4 }} + {{- include "app.commonLabels" . | nindent 4 }} + {{- include "app.labels" . | nindent 4 }} + {{- if .Values.role.labels -}} + {{- toYaml .Values.role.labels | nindent 4 }} + {{- end }} + annotations: + {{- if .Values.role.annotations -}} + {{- toYaml .Values.role.annotations | nindent 4 }} + {{- end }} +rules: + - apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "create", "update", "delete"] + - apiGroups: [""] + resources: ["namespaces"] + verbs: ["get"] \ No newline at end of file diff --git a/charts/operator-wandb/charts/app/templates/rolebinding.yaml b/charts/operator-wandb/charts/app/templates/rolebinding.yaml new file mode 100644 index 00000000..3441d038 --- /dev/null +++ b/charts/operator-wandb/charts/app/templates/rolebinding.yaml @@ -0,0 +1,23 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "app.fullname" . }} + labels: + {{- include "wandb.commonLabels" . | nindent 4 }} + {{- include "app.commonLabels" . | nindent 4 }} + {{- include "app.labels" . | nindent 4 }} + {{- if .Values.role.labels -}} + {{- toYaml .Values.role.labels | nindent 4 }} + {{- end }} + annotations: + {{- if .Values.role.annotations -}} + {{- toYaml .Values.role.annotations | nindent 4 }} + {{- end }} +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: {{ include "app.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ include "app.fullname" . }} + namespace: {{ .Release.Namespace }} diff --git a/charts/operator-wandb/old/prometheus/templates/serviceaccount.yaml b/charts/operator-wandb/charts/app/templates/serviceaccount.yaml similarity index 72% rename from charts/operator-wandb/old/prometheus/templates/serviceaccount.yaml rename to charts/operator-wandb/charts/app/templates/serviceaccount.yaml index f8f43a3b..d187e6bb 100644 --- a/charts/operator-wandb/old/prometheus/templates/serviceaccount.yaml +++ b/charts/operator-wandb/charts/app/templates/serviceaccount.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "prometheus.fullname" . }} + name: {{ include "app.fullname" . }} namespace: {{ $.Release.Namespace }} labels: {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "prometheus.commonLabels" . | nindent 4 }} - {{- include "prometheus.labels" . | nindent 4 }} + {{- include "app.commonLabels" . | nindent 4 }} + {{- include "app.labels" . | nindent 4 }} {{- if .Values.serviceAccount.labels -}} {{- toYaml .Values.serviceAccount.labels | nindent 4 }} {{- end }} diff --git a/charts/operator-wandb/charts/app/values.yaml b/charts/operator-wandb/charts/app/values.yaml index e5551afc..1b5cd306 100644 --- a/charts/operator-wandb/charts/app/values.yaml +++ b/charts/operator-wandb/charts/app/values.yaml @@ -49,3 +49,7 @@ resources: limits: cpu: 4000m memory: 8Gi + +serviceAccount: {} +role: {} +roleBinding: {} diff --git a/charts/operator-wandb/old/prometheus/.helmignore b/charts/operator-wandb/old/prometheus/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/charts/operator-wandb/old/prometheus/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/operator-wandb/old/prometheus/Chart.yaml b/charts/operator-wandb/old/prometheus/Chart.yaml deleted file mode 100644 index 987140b6..00000000 --- a/charts/operator-wandb/old/prometheus/Chart.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v2 -name: prometheus -type: application -description: A Helm chart for Kubernetes - -version: 0.1.0 -appVersion: "1.0.0" - -home: https://wandb.ai -icon: https://wandb.ai/logo.svg - -maintainers: - - name: wandb - email: support@wandb.com - url: https://wandb.com - -dependencies: - - name: mysql-exporter - version: "*.*.*" - repository: file://charts/mysql-exporter - condition: mysql-exporter.install - - name: node-exporter - version: "*.*.*" - repository: file://charts/node-exporter - condition: node-exporter.install diff --git a/charts/operator-wandb/old/prometheus/README.md b/charts/operator-wandb/old/prometheus/README.md deleted file mode 100644 index df63bb6b..00000000 --- a/charts/operator-wandb/old/prometheus/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Local - -- [Local](#local) - - [Requirements](#requirements) - - [Configuration](#configuration) - - [Globals](#globals) - - [Options](#options) - - [Chart configuration examples](#chart-configuration-examples) - - [extraEnv](#extraenv) - - [extraEnvFrom](#extraenvfrom) - - [extraEnvFrom](#extraenvfrom-1) - -## Requirements - -This chart depends on Redis, Bucket and MySQL services, either as part of the -complete W&B Server chart or provided as external services reachable from the -Kubernetes cluster this chart is deployed onto. - -## Configuration - -### Globals - -### Options - -| Parameter | Default | Description | -| ------------------- | ------------- | -------------------------------------------------------------------------------------------------- | -| `enabled` | `true` | Server enable flag | -| `priorityClassName` | `""` | Allow configuring pods priorityClassName, this is used to control pod priority in case of eviction | -| `common.labels` | | Supplemental labels that are applied to all objects created by this chart. | -| `podLabels` | | Supplemental Pod labels. Will not be used for selectors. | -| `extraEnv` | | List of extra environment variables to expose | -| `extraEnvFrom` | | List of extra environment variables from other data sources to expose | -| `image.pullPolicy` | `Always` | Server image pull policy | -| `image.pullSecrets` | | Secrets for the image repository | -| `image.repository` | `wandb/local` | Server image repository | -| `image.tag` | | Server image tag | -| `tolerations` | `[]` | Toleration labels for pod assignment | - -### Chart configuration examples - -#### extraEnv - -#### extraEnvFrom - -`extraEnv` allows you to expose additional environment variables in all -containers in the pods. - -```yaml -extraEnv: - SOME_KEY: some_value - SOME_OTHER_KEY: some_other_value -``` - -When the container is started, you can confirm that the environment variables -are exposed: - -Below is an example use of extraEnv: - -```bash -env | grep SOME -SOME_KEY=some_value -SOME_OTHER_KEY=some_other_value -``` - -#### extraEnvFrom - -`extraEnvFrom` allows you to expose additional environment variables from other -data sources in all containers in the pods. Subsequent variables can be -overridden per deployment. - -Below is an example use of `extraEnvFrom`: - -```yaml -extraEnvFrom: - MY_NODE_NAME: - fieldRef: - fieldPath: spec.nodeName - MY_CPU_REQUEST: - resourceFieldRef: - containerName: test-container - resource: requests.cpu - SECRET_THING: - secretKeyRef: - name: special-secret - key: special_token - # optional: boolean -``` diff --git a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/.helmignore b/charts/operator-wandb/old/prometheus/charts/mysql-exporter/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/Chart.yaml b/charts/operator-wandb/old/prometheus/charts/mysql-exporter/Chart.yaml deleted file mode 100644 index 9f9926e7..00000000 --- a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v2 -name: mysql-exporter -type: application -description: A Helm chart for Kubernetes - -version: 0.1.0 -appVersion: "0.33.0" - -home: https://wandb.ai -icon: https://wandb.ai/logo.svg - -maintainers: - - name: wandb - email: support@wandb.com - url: https://wandb.com diff --git a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/README.md b/charts/operator-wandb/old/prometheus/charts/mysql-exporter/README.md deleted file mode 100644 index df63bb6b..00000000 --- a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Local - -- [Local](#local) - - [Requirements](#requirements) - - [Configuration](#configuration) - - [Globals](#globals) - - [Options](#options) - - [Chart configuration examples](#chart-configuration-examples) - - [extraEnv](#extraenv) - - [extraEnvFrom](#extraenvfrom) - - [extraEnvFrom](#extraenvfrom-1) - -## Requirements - -This chart depends on Redis, Bucket and MySQL services, either as part of the -complete W&B Server chart or provided as external services reachable from the -Kubernetes cluster this chart is deployed onto. - -## Configuration - -### Globals - -### Options - -| Parameter | Default | Description | -| ------------------- | ------------- | -------------------------------------------------------------------------------------------------- | -| `enabled` | `true` | Server enable flag | -| `priorityClassName` | `""` | Allow configuring pods priorityClassName, this is used to control pod priority in case of eviction | -| `common.labels` | | Supplemental labels that are applied to all objects created by this chart. | -| `podLabels` | | Supplemental Pod labels. Will not be used for selectors. | -| `extraEnv` | | List of extra environment variables to expose | -| `extraEnvFrom` | | List of extra environment variables from other data sources to expose | -| `image.pullPolicy` | `Always` | Server image pull policy | -| `image.pullSecrets` | | Secrets for the image repository | -| `image.repository` | `wandb/local` | Server image repository | -| `image.tag` | | Server image tag | -| `tolerations` | `[]` | Toleration labels for pod assignment | - -### Chart configuration examples - -#### extraEnv - -#### extraEnvFrom - -`extraEnv` allows you to expose additional environment variables in all -containers in the pods. - -```yaml -extraEnv: - SOME_KEY: some_value - SOME_OTHER_KEY: some_other_value -``` - -When the container is started, you can confirm that the environment variables -are exposed: - -Below is an example use of extraEnv: - -```bash -env | grep SOME -SOME_KEY=some_value -SOME_OTHER_KEY=some_other_value -``` - -#### extraEnvFrom - -`extraEnvFrom` allows you to expose additional environment variables from other -data sources in all containers in the pods. Subsequent variables can be -overridden per deployment. - -Below is an example use of `extraEnvFrom`: - -```yaml -extraEnvFrom: - MY_NODE_NAME: - fieldRef: - fieldPath: spec.nodeName - MY_CPU_REQUEST: - resourceFieldRef: - containerName: test-container - resource: requests.cpu - SECRET_THING: - secretKeyRef: - name: special-secret - key: special_token - # optional: boolean -``` diff --git a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/_helpers.tpl b/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/_helpers.tpl deleted file mode 100644 index e1902036..00000000 --- a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/_helpers.tpl +++ /dev/null @@ -1,123 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Expand the name of the chart. -*/}} -{{- define "mysql-exporter.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mysql-exporter.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "mysql-exporter.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "mysql-exporter.labels" -}} -helm.sh/chart: {{ include "mysql-exporter.chart" . }} -{{ include "mysql-exporter.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -wandb.com/app-name: {{ include "mysql-exporter.chart" . }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "mysql-exporter.selectorLabels" -}} -app.kubernetes.io/name: {{ include "mysql-exporter.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mysql-exporter.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "mysql-exporter.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - -{{/* -Returns the extraEnv keys and values to inject into containers. - -Global values will override any chart-specific values. -*/}} -{{- define "mysql-exporter.extraEnv" -}} -{{- $allExtraEnv := merge (default (dict) .local.extraEnv) .global.extraEnv -}} -{{- range $key, $value := $allExtraEnv }} -- name: {{ $key }} - value: {{ $value | quote }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _common_ labels to be shared across all -app deployments and other shared objects. -*/}} -{{- define "mysql-exporter.commonLabels" -}} -{{- $commonLabels := default (dict) .Values.common.labels -}} -{{- if $commonLabels }} -{{- range $key, $value := $commonLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _pod_ labels to be shared across all -app deployments. -*/}} -{{- define "mysql-exporter.podLabels" -}} -{{- range $key, $value := .Values.pod.labels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} - -{{- define "mysql-exporter.redis" -}} -{{- $cs := include "wandb.redis.connectionString" . }} -{{- $ca := include "wandb.redis.caCert" . }} -{{- if $ca }} -{{- printf "%s?tls=true&caCertPath=/etc/ssl/certs/redis_ca.pem&ttlInSeconds=604800" $cs -}} -{{- else }} -{{- print $cs -}} -{{- end }} -{{- end }} - -{{- define "mysql-exporter.bucket" -}} -{{- if eq .Values.global.bucket.provider "az" }} -{{- printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}} -{{- end }} -{{- if eq .Values.global.bucket.provider "gcs" }} -{{- printf "gs://%s" .Values.global.bucket.name -}} -{{- end }} -{{- if eq .Values.global.bucket.provider "s3" }} -{{- printf "s3://%s" .Values.global.bucket.name -}} -{{- end }} -{{- end }} diff --git a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/deployment.yaml b/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/deployment.yaml deleted file mode 100644 index 5bb6411c..00000000 --- a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/deployment.yaml +++ /dev/null @@ -1,99 +0,0 @@ -{{- if .Values.enabled }} -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "mysql-exporter.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "mysql-exporter.commonLabels" . | nindent 4 }} - {{- include "mysql-exporter.labels" . | nindent 4 }} - {{- if .Values.deployment.labels -}} - {{- toYaml .Values.deployment.labels | nindent 4 }} - {{- end }} - annotations: - {{- include "wandb.deploymentAnnotations" $ | nindent 4 }} - {{- if .Values.deployment.annotations -}} - {{- toYaml .Values.deployment.annotations | nindent 4 }} - {{- end }} -spec: - replicas: 1 - selector: - matchLabels: - {{- include "wandb.selectorLabels" $ | nindent 6 }} - {{- include "mysql-exporter.labels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "wandb.podLabels" . | nindent 8 }} - {{- include "mysql-exporter.commonLabels" . | nindent 8 }} - {{- include "mysql-exporter.podLabels" . | nindent 8 }} - {{- include "mysql-exporter.labels" . | nindent 8 }} - annotations: - {{- if .Values.pod.annotations -}} - {{- toYaml .Values.pod.annotations | nindent 4 }} - {{- end }} - spec: - {{- if .tolerations }} - tolerations: - {{- toYaml .tolerations | nindent 8 }} - {{- end }} - {{- include "wandb.nodeSelector" . | nindent 6 }} - {{- include "wandb.priorityClassName" . | nindent 6 }} - {{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - args: - - --mysqld.address=$(MYSQL_HOST):$(MYSQL_PORT) - - --mysqld.username=$(MYSQL_USER) - ports: - - name: exporter - containerPort: 9104 - protocol: TCP - env: - - name: MYSQL_PORT - value: "{{ include "wandb.mysql.port" . }}" - - name: MYSQL_HOST - value: "{{ include "wandb.mysql.host" . }}" - - name: MYSQL_DATABASE - value: "{{ include "wandb.mysql.database" . }}" - - name: MYSQL_USER - value: "{{ include "wandb.mysql.user" . }}" - - name: MYSQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "wandb.mysql.passwordSecret" . }} - key: MYSQL_PASSWORD - - name: MYSQL - value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)" - - - name: MYSQLD_EXPORTER_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "wandb.mysql.passwordSecret" . }} - key: MYSQL_PASSWORD - - {{- include "mysql-exporter.extraEnv" (dict "global" $.Values.global "local" .Values) | nindent 12 }} - {{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - livenessProbe: - httpGet: - path: / - port: exporter - readinessProbe: - httpGet: - path: / - port: exporter - - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - {{- if ne (include "wandb.redis.caCert" .) "" }} - - name: {{ include "mysql-exporter.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" - items: - - key: REDIS_CA_CERT - path: redis_ca.pem - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/service.yaml b/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/service.yaml deleted file mode 100644 index 59ea10a2..00000000 --- a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/templates/service.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "mysql-exporter.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "mysql-exporter.labels" . | nindent 4 }} - {{- include "mysql-exporter.commonLabels" . | nindent 4 }} - {{- if .Values.service.labels -}} - {{- toYaml .Values.service.labels | nindent 4 }} - {{- end }} - annotations: - prometheus.io/scrape: 'true' - prometheus.io/path: '/metrics' - prometheus.io/port: '9104' - {{- if .Values.service.annotations -}} - {{- toYaml .Values.service.annotations | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.service.type }} - ports: - - port: 9104 - protocol: TCP - name: mysql-exporter - selector: - {{- include "mysql-exporter.labels" . | nindent 4 }} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/values.yaml b/charts/operator-wandb/old/prometheus/charts/mysql-exporter/values.yaml deleted file mode 100644 index 6cbe3854..00000000 --- a/charts/operator-wandb/old/prometheus/charts/mysql-exporter/values.yaml +++ /dev/null @@ -1,47 +0,0 @@ -enabled: true - -nameOverride: "prometheus-mysql-exporter" -fullnameOverride: "" - -image: - repository: prom/mysqld-exporter - tag: latest - pullPolicy: Always - -# Tolerations for pod scheduling -tolerations: [] - -extraEnv: {} -extraEnvFrom: {} - -extraCors: [] - -pod: - securityContext: {} - labels: {} - annotations: {} - -common: - labels: {} - -deployment: - labels: {} - annotations: {} - -service: - type: ClusterIP - annotations: {} - labels: {} - -resources: - # We usually recommend not to specify default resources and to leave this as a - # conscious choice for the user. This also increases chances charts run on - # environments with little resources, such as Minikube. If you do want to - # specify resources, uncomment the following lines, adjust them as necessary, - # and remove the curly braces after 'resources:'. - requests: - cpu: 100m - memory: 100Mi - limits: - cpu: 300m - memory: 200Mi diff --git a/charts/operator-wandb/old/prometheus/charts/node-exporter/.helmignore b/charts/operator-wandb/old/prometheus/charts/node-exporter/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/charts/operator-wandb/old/prometheus/charts/node-exporter/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/operator-wandb/old/prometheus/charts/node-exporter/Chart.yaml b/charts/operator-wandb/old/prometheus/charts/node-exporter/Chart.yaml deleted file mode 100644 index abe33d91..00000000 --- a/charts/operator-wandb/old/prometheus/charts/node-exporter/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v2 -name: node-exporter -type: application -description: A Helm chart for Kubernetes - -version: 0.1.0 -appVersion: "0.33.0" - -home: https://wandb.ai -icon: https://wandb.ai/logo.svg - -maintainers: - - name: wandb - email: support@wandb.com - url: https://wandb.com diff --git a/charts/operator-wandb/old/prometheus/charts/node-exporter/README.md b/charts/operator-wandb/old/prometheus/charts/node-exporter/README.md deleted file mode 100644 index df63bb6b..00000000 --- a/charts/operator-wandb/old/prometheus/charts/node-exporter/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Local - -- [Local](#local) - - [Requirements](#requirements) - - [Configuration](#configuration) - - [Globals](#globals) - - [Options](#options) - - [Chart configuration examples](#chart-configuration-examples) - - [extraEnv](#extraenv) - - [extraEnvFrom](#extraenvfrom) - - [extraEnvFrom](#extraenvfrom-1) - -## Requirements - -This chart depends on Redis, Bucket and MySQL services, either as part of the -complete W&B Server chart or provided as external services reachable from the -Kubernetes cluster this chart is deployed onto. - -## Configuration - -### Globals - -### Options - -| Parameter | Default | Description | -| ------------------- | ------------- | -------------------------------------------------------------------------------------------------- | -| `enabled` | `true` | Server enable flag | -| `priorityClassName` | `""` | Allow configuring pods priorityClassName, this is used to control pod priority in case of eviction | -| `common.labels` | | Supplemental labels that are applied to all objects created by this chart. | -| `podLabels` | | Supplemental Pod labels. Will not be used for selectors. | -| `extraEnv` | | List of extra environment variables to expose | -| `extraEnvFrom` | | List of extra environment variables from other data sources to expose | -| `image.pullPolicy` | `Always` | Server image pull policy | -| `image.pullSecrets` | | Secrets for the image repository | -| `image.repository` | `wandb/local` | Server image repository | -| `image.tag` | | Server image tag | -| `tolerations` | `[]` | Toleration labels for pod assignment | - -### Chart configuration examples - -#### extraEnv - -#### extraEnvFrom - -`extraEnv` allows you to expose additional environment variables in all -containers in the pods. - -```yaml -extraEnv: - SOME_KEY: some_value - SOME_OTHER_KEY: some_other_value -``` - -When the container is started, you can confirm that the environment variables -are exposed: - -Below is an example use of extraEnv: - -```bash -env | grep SOME -SOME_KEY=some_value -SOME_OTHER_KEY=some_other_value -``` - -#### extraEnvFrom - -`extraEnvFrom` allows you to expose additional environment variables from other -data sources in all containers in the pods. Subsequent variables can be -overridden per deployment. - -Below is an example use of `extraEnvFrom`: - -```yaml -extraEnvFrom: - MY_NODE_NAME: - fieldRef: - fieldPath: spec.nodeName - MY_CPU_REQUEST: - resourceFieldRef: - containerName: test-container - resource: requests.cpu - SECRET_THING: - secretKeyRef: - name: special-secret - key: special_token - # optional: boolean -``` diff --git a/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/_helpers.tpl b/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/_helpers.tpl deleted file mode 100644 index 6f00fc13..00000000 --- a/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/_helpers.tpl +++ /dev/null @@ -1,123 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Expand the name of the chart. -*/}} -{{- define "node-exporter.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "node-exporter.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "node-exporter.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "node-exporter.labels" -}} -helm.sh/chart: {{ include "node-exporter.chart" . }} -{{ include "node-exporter.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -wandb.com/app-name: {{ include "node-exporter.chart" . }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "node-exporter.selectorLabels" -}} -app.kubernetes.io/name: {{ include "node-exporter.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "node-exporter.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "node-exporter.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - -{{/* -Returns the extraEnv keys and values to inject into containers. - -Global values will override any chart-specific values. -*/}} -{{- define "node-exporter.extraEnv" -}} -{{- $allExtraEnv := merge (default (dict) .local.extraEnv) .global.extraEnv -}} -{{- range $key, $value := $allExtraEnv }} -- name: {{ $key }} - value: {{ $value | quote }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _common_ labels to be shared across all -app deployments and other shared objects. -*/}} -{{- define "node-exporter.commonLabels" -}} -{{- $commonLabels := default (dict) .Values.common.labels -}} -{{- if $commonLabels }} -{{- range $key, $value := $commonLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _pod_ labels to be shared across all -app deployments. -*/}} -{{- define "node-exporter.podLabels" -}} -{{- range $key, $value := .Values.pod.labels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} - -{{- define "node-exporter.redis" -}} -{{- $cs := include "wandb.redis.connectionString" . }} -{{- $ca := include "wandb.redis.caCert" . }} -{{- if $ca }} -{{- printf "%s?tls=true&caCertPath=/etc/ssl/certs/redis_ca.pem&ttlInSeconds=604800" $cs -}} -{{- else }} -{{- print $cs -}} -{{- end }} -{{- end }} - -{{- define "node-exporter.bucket" -}} -{{- if eq .Values.global.bucket.provider "az" }} -{{- printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}} -{{- end }} -{{- if eq .Values.global.bucket.provider "gcs" }} -{{- printf "gs://%s" .Values.global.bucket.name -}} -{{- end }} -{{- if eq .Values.global.bucket.provider "s3" }} -{{- printf "s3://%s" .Values.global.bucket.name -}} -{{- end }} -{{- end }} diff --git a/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/damenset.yaml b/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/damenset.yaml deleted file mode 100644 index 81281bc2..00000000 --- a/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/damenset.yaml +++ /dev/null @@ -1,86 +0,0 @@ -{{- if .Values.enabled }} -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: {{ include "node-exporter.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "node-exporter.commonLabels" . | nindent 4 }} - {{- include "node-exporter.labels" . | nindent 4 }} - {{- if .Values.deployment.labels -}} - {{- toYaml .Values.deployment.labels | nindent 4 }} - {{- end }} - annotations: - {{- include "wandb.deploymentAnnotations" $ | nindent 4 }} - {{- if .Values.deployment.annotations -}} - {{- toYaml .Values.deployment.annotations | nindent 4 }} - {{- end }} -spec: - selector: - matchLabels: - {{- include "wandb.selectorLabels" $ | nindent 6 }} - {{- include "node-exporter.labels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "wandb.podLabels" . | nindent 8 }} - {{- include "node-exporter.commonLabels" . | nindent 8 }} - {{- include "node-exporter.podLabels" . | nindent 8 }} - {{- include "node-exporter.labels" . | nindent 8 }} - annotations: - {{- if .Values.pod.annotations -}} - {{- toYaml .Values.pod.annotations | nindent 4 }} - {{- end }} - spec: - {{- if .tolerations }} - tolerations: - {{- toYaml .tolerations | nindent 8 }} - {{- end }} - {{- include "wandb.nodeSelector" . | nindent 6 }} - {{- include "wandb.priorityClassName" . | nindent 6 }} - {{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - args: - - --path.sysfs=/host/sys - - --path.rootfs=/host/root - - --no-collector.wifi - - --no-collector.hwmon - - --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/) - - --collector.netclass.ignored-devices=^(veth.*)$ - ports: - - name: exporter - containerPort: 9100 - protocol: TCP - env: - {{- include "node-exporter.extraEnv" (dict "global" $.Values.global "local" .Values) | nindent 12 }} - {{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - livenessProbe: - httpGet: - path: / - port: exporter - readinessProbe: - httpGet: - path: / - port: exporter - volumeMounts: - - mountPath: /host/sys - mountPropagation: HostToContainer - name: sys - readOnly: true - - mountPath: /host/root - mountPropagation: HostToContainer - name: root - readOnly: true - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - - hostPath: - path: /sys - name: sys - - hostPath: - path: / - name: root -{{- end }} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/service.yaml b/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/service.yaml deleted file mode 100644 index 12c26eff..00000000 --- a/charts/operator-wandb/old/prometheus/charts/node-exporter/templates/service.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "node-exporter.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "node-exporter.labels" . | nindent 4 }} - {{- include "node-exporter.commonLabels" . | nindent 4 }} - {{- if .Values.service.labels -}} - {{- toYaml .Values.service.labels | nindent 4 }} - {{- end }} - annotations: - prometheus.io/scrape: 'true' - prometheus.io/path: '/metrics' - prometheus.io/port: '9100' - {{- if .Values.service.annotations -}} - {{- toYaml .Values.service.annotations | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.service.type }} - ports: - - port: 9100 - targetPort: 9100 - protocol: TCP - name: node-exporter - selector: - {{- include "node-exporter.labels" . | nindent 4 }} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/charts/node-exporter/values.yaml b/charts/operator-wandb/old/prometheus/charts/node-exporter/values.yaml deleted file mode 100644 index f514325a..00000000 --- a/charts/operator-wandb/old/prometheus/charts/node-exporter/values.yaml +++ /dev/null @@ -1,47 +0,0 @@ -enabled: true - -nameOverride: "prometheus-node-exporter" -fullnameOverride: "" - -image: - repository: prom/node-exporter - tag: latest - pullPolicy: Always - -# Tolerations for pod scheduling -tolerations: [] - -extraEnv: {} -extraEnvFrom: {} - -extraCors: [] - -pod: - securityContext: {} - labels: {} - annotations: {} - -common: - labels: {} - -deployment: - labels: {} - annotations: {} - -service: - type: ClusterIP - annotations: {} - labels: {} - -resources: - # We usually recommend not to specify default resources and to leave this as a - # conscious choice for the user. This also increases chances charts run on - # environments with little resources, such as Minikube. If you do want to - # specify resources, uncomment the following lines, adjust them as necessary, - # and remove the curly braces after 'resources:'. - requests: - cpu: 100m - memory: 100Mi - limits: - cpu: 250m - memory: 200Mi diff --git a/charts/operator-wandb/old/prometheus/charts/redis-exporter/.helmignore b/charts/operator-wandb/old/prometheus/charts/redis-exporter/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/charts/operator-wandb/old/prometheus/charts/redis-exporter/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/operator-wandb/old/prometheus/charts/redis-exporter/Chart.yaml b/charts/operator-wandb/old/prometheus/charts/redis-exporter/Chart.yaml deleted file mode 100644 index 9f9926e7..00000000 --- a/charts/operator-wandb/old/prometheus/charts/redis-exporter/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v2 -name: mysql-exporter -type: application -description: A Helm chart for Kubernetes - -version: 0.1.0 -appVersion: "0.33.0" - -home: https://wandb.ai -icon: https://wandb.ai/logo.svg - -maintainers: - - name: wandb - email: support@wandb.com - url: https://wandb.com diff --git a/charts/operator-wandb/old/prometheus/charts/redis-exporter/README.md b/charts/operator-wandb/old/prometheus/charts/redis-exporter/README.md deleted file mode 100644 index df63bb6b..00000000 --- a/charts/operator-wandb/old/prometheus/charts/redis-exporter/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Local - -- [Local](#local) - - [Requirements](#requirements) - - [Configuration](#configuration) - - [Globals](#globals) - - [Options](#options) - - [Chart configuration examples](#chart-configuration-examples) - - [extraEnv](#extraenv) - - [extraEnvFrom](#extraenvfrom) - - [extraEnvFrom](#extraenvfrom-1) - -## Requirements - -This chart depends on Redis, Bucket and MySQL services, either as part of the -complete W&B Server chart or provided as external services reachable from the -Kubernetes cluster this chart is deployed onto. - -## Configuration - -### Globals - -### Options - -| Parameter | Default | Description | -| ------------------- | ------------- | -------------------------------------------------------------------------------------------------- | -| `enabled` | `true` | Server enable flag | -| `priorityClassName` | `""` | Allow configuring pods priorityClassName, this is used to control pod priority in case of eviction | -| `common.labels` | | Supplemental labels that are applied to all objects created by this chart. | -| `podLabels` | | Supplemental Pod labels. Will not be used for selectors. | -| `extraEnv` | | List of extra environment variables to expose | -| `extraEnvFrom` | | List of extra environment variables from other data sources to expose | -| `image.pullPolicy` | `Always` | Server image pull policy | -| `image.pullSecrets` | | Secrets for the image repository | -| `image.repository` | `wandb/local` | Server image repository | -| `image.tag` | | Server image tag | -| `tolerations` | `[]` | Toleration labels for pod assignment | - -### Chart configuration examples - -#### extraEnv - -#### extraEnvFrom - -`extraEnv` allows you to expose additional environment variables in all -containers in the pods. - -```yaml -extraEnv: - SOME_KEY: some_value - SOME_OTHER_KEY: some_other_value -``` - -When the container is started, you can confirm that the environment variables -are exposed: - -Below is an example use of extraEnv: - -```bash -env | grep SOME -SOME_KEY=some_value -SOME_OTHER_KEY=some_other_value -``` - -#### extraEnvFrom - -`extraEnvFrom` allows you to expose additional environment variables from other -data sources in all containers in the pods. Subsequent variables can be -overridden per deployment. - -Below is an example use of `extraEnvFrom`: - -```yaml -extraEnvFrom: - MY_NODE_NAME: - fieldRef: - fieldPath: spec.nodeName - MY_CPU_REQUEST: - resourceFieldRef: - containerName: test-container - resource: requests.cpu - SECRET_THING: - secretKeyRef: - name: special-secret - key: special_token - # optional: boolean -``` diff --git a/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/_helpers.tpl b/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/_helpers.tpl deleted file mode 100644 index afca8701..00000000 --- a/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/_helpers.tpl +++ /dev/null @@ -1,123 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Expand the name of the chart. -*/}} -{{- define "redis-exporter.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "redis-exporter.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "redis-exporter.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "redis-exporter.labels" -}} -helm.sh/chart: {{ include "redis-exporter.chart" . }} -{{ include "redis-exporter.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -wandb.com/app-name: {{ include "redis-exporter.chart" . }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "redis-exporter.selectorLabels" -}} -app.kubernetes.io/name: {{ include "redis-exporter.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "redis-exporter.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "redis-exporter.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - -{{/* -Returns the extraEnv keys and values to inject into containers. - -Global values will override any chart-specific values. -*/}} -{{- define "redis-exporter.extraEnv" -}} -{{- $allExtraEnv := merge (default (dict) .local.extraEnv) .global.extraEnv -}} -{{- range $key, $value := $allExtraEnv }} -- name: {{ $key }} - value: {{ $value | quote }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _common_ labels to be shared across all -app deployments and other shared objects. -*/}} -{{- define "redis-exporter.commonLabels" -}} -{{- $commonLabels := default (dict) .Values.common.labels -}} -{{- if $commonLabels }} -{{- range $key, $value := $commonLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _pod_ labels to be shared across all -app deployments. -*/}} -{{- define "redis-exporter.podLabels" -}} -{{- range $key, $value := .Values.pod.labels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} - -{{- define "redis-exporter.redis" -}} -{{- $cs := include "wandb.redis.connectionString" . }} -{{- $ca := include "wandb.redis.caCert" . }} -{{- if $ca }} -{{- printf "%s?tls=true&caCertPath=/etc/ssl/certs/redis_ca.pem&ttlInSeconds=604800" $cs -}} -{{- else }} -{{- print $cs -}} -{{- end }} -{{- end }} - -{{- define "redis-exporter.bucket" -}} -{{- if eq .Values.global.bucket.provider "az" }} -{{- printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}} -{{- end }} -{{- if eq .Values.global.bucket.provider "gcs" }} -{{- printf "gs://%s" .Values.global.bucket.name -}} -{{- end }} -{{- if eq .Values.global.bucket.provider "s3" }} -{{- printf "s3://%s" .Values.global.bucket.name -}} -{{- end }} -{{- end }} diff --git a/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/deployment.yaml b/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/deployment.yaml deleted file mode 100644 index edd4ec94..00000000 --- a/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/deployment.yaml +++ /dev/null @@ -1,99 +0,0 @@ -{{- if .Values.enabled }} -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "redis-exporter.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "redis-exporter.commonLabels" . | nindent 4 }} - {{- include "redis-exporter.labels" . | nindent 4 }} - {{- if .Values.deployment.labels -}} - {{- toYaml .Values.deployment.labels | nindent 4 }} - {{- end }} - annotations: - {{- include "wandb.deploymentAnnotations" $ | nindent 4 }} - {{- if .Values.deployment.annotations -}} - {{- toYaml .Values.deployment.annotations | nindent 4 }} - {{- end }} -spec: - replicas: 1 - selector: - matchLabels: - {{- include "wandb.selectorLabels" $ | nindent 6 }} - {{- include "redis-exporter.labels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "wandb.podLabels" . | nindent 8 }} - {{- include "redis-exporter.commonLabels" . | nindent 8 }} - {{- include "redis-exporter.podLabels" . | nindent 8 }} - {{- include "redis-exporter.labels" . | nindent 8 }} - annotations: - {{- if .Values.pod.annotations -}} - {{- toYaml .Values.pod.annotations | nindent 4 }} - {{- end }} - spec: - {{- if .tolerations }} - tolerations: - {{- toYaml .tolerations | nindent 8 }} - {{- end }} - {{- include "wandb.nodeSelector" . | nindent 6 }} - {{- include "wandb.priorityClassName" . | nindent 6 }} - {{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - args: - - --mysqld.address=$(MYSQL_HOST):$(MYSQL_PORT) - - --mysqld.username=$(MYSQL_USER) - ports: - - name: exporter - containerPort: 9104 - protocol: TCP - env: - - name: MYSQL_PORT - value: "{{ include "wandb.mysql.port" . }}" - - name: MYSQL_HOST - value: "{{ include "wandb.mysql.host" . }}" - - name: MYSQL_DATABASE - value: "{{ include "wandb.mysql.database" . }}" - - name: MYSQL_USER - value: "{{ include "wandb.mysql.user" . }}" - - name: MYSQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "wandb.mysql.passwordSecret" . }} - key: MYSQL_PASSWORD - - name: MYSQL - value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)" - - - name: MYSQLD_EXPORTER_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "wandb.mysql.passwordSecret" . }} - key: MYSQL_PASSWORD - - {{- include "redis-exporter.extraEnv" (dict "global" $.Values.global "local" .Values) | nindent 12 }} - {{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - livenessProbe: - httpGet: - path: / - port: exporter - readinessProbe: - httpGet: - path: / - port: exporter - - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - {{- if ne (include "wandb.redis.caCert" .) "" }} - - name: {{ include "redis-exporter.fullname" . }}-redis-ca - secret: - secretName: "{{ include "wandb.redis.passwordSecret" . }}" - items: - - key: REDIS_CA_CERT - path: redis_ca.pem - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/service.yaml b/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/service.yaml deleted file mode 100644 index 5e4a091f..00000000 --- a/charts/operator-wandb/old/prometheus/charts/redis-exporter/templates/service.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "redis-exporter.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "redis-exporter.labels" . | nindent 4 }} - {{- include "redis-exporter.commonLabels" . | nindent 4 }} - {{- if .Values.service.labels -}} - {{- toYaml .Values.service.labels | nindent 4 }} - {{- end }} - annotations: - prometheus.io/scrape: 'true' - prometheus.io/path: '/metrics' - prometheus.io/port: '9104' - {{- if .Values.service.annotations -}} - {{- toYaml .Values.service.annotations | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.service.type }} - ports: - - port: 9104 - protocol: TCP - name: redis-exporter - selector: - {{- include "redis-exporter.labels" . | nindent 4 }} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/charts/redis-exporter/values.yaml b/charts/operator-wandb/old/prometheus/charts/redis-exporter/values.yaml deleted file mode 100644 index 168929a1..00000000 --- a/charts/operator-wandb/old/prometheus/charts/redis-exporter/values.yaml +++ /dev/null @@ -1,47 +0,0 @@ -enabled: true - -nameOverride: "prometheus-redis-exporter" -fullnameOverride: "" - -image: - repository: prom/redis-exporter - tag: latest - pullPolicy: Always - -# Tolerations for pod scheduling -tolerations: [] - -extraEnv: {} -extraEnvFrom: {} - -extraCors: [] - -pod: - securityContext: {} - labels: {} - annotations: {} - -common: - labels: {} - -deployment: - labels: {} - annotations: {} - -service: - type: ClusterIP - annotations: {} - labels: {} - -resources: - # We usually recommend not to specify default resources and to leave this as a - # conscious choice for the user. This also increases chances charts run on - # environments with little resources, such as Minikube. If you do want to - # specify resources, uncomment the following lines, adjust them as necessary, - # and remove the curly braces after 'resources:'. - requests: - cpu: 100m - memory: 100Mi - limits: - cpu: 300m - memory: 200Mi diff --git a/charts/operator-wandb/old/prometheus/templates/_helpers.tpl b/charts/operator-wandb/old/prometheus/templates/_helpers.tpl deleted file mode 100644 index 0e8f30ae..00000000 --- a/charts/operator-wandb/old/prometheus/templates/_helpers.tpl +++ /dev/null @@ -1,91 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Expand the name of the chart. -*/}} -{{- define "prometheus.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "prometheus.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "prometheus.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "prometheus.labels" -}} -helm.sh/chart: {{ include "prometheus.chart" . }} -{{ include "prometheus.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -wandb.com/app-name: {{ include "prometheus.chart" . }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "prometheus.selectorLabels" -}} -app.kubernetes.io/name: {{ include "prometheus.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Returns the extraEnv keys and values to inject into containers. - -Global values will override any chart-specific values. -*/}} -{{- define "prometheus.extraEnv" -}} -{{- $allExtraEnv := merge (default (dict) .local.extraEnv) .global.extraEnv -}} -{{- range $key, $value := $allExtraEnv }} -- name: {{ $key }} - value: {{ $value | quote }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _common_ labels to be shared across all -app deployments and other shared objects. -*/}} -{{- define "prometheus.commonLabels" -}} -{{- $commonLabels := default (dict) .Values.common.labels -}} -{{- if $commonLabels }} -{{- range $key, $value := $commonLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _pod_ labels to be shared across all -app deployments. -*/}} -{{- define "prometheus.podLabels" -}} -{{- range $key, $value := .Values.pod.labels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} - diff --git a/charts/operator-wandb/old/prometheus/templates/clusterrole.yaml b/charts/operator-wandb/old/prometheus/templates/clusterrole.yaml deleted file mode 100644 index 3385a2f5..00000000 --- a/charts/operator-wandb/old/prometheus/templates/clusterrole.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "prometheus.fullname" . }} -rules: -- apiGroups: [""] - resources: - - nodes - - nodes/proxy - - services - - endpoints - - pods - verbs: ["get", "list", "watch"] -- apiGroups: - - extensions - resources: - - ingresses - verbs: ["get", "list", "watch"] -- nonResourceURLs: ["/metrics"] - verbs: ["get"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "prometheus.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "prometheus.commonLabels" . | nindent 4 }} - {{- include "prometheus.labels" . | nindent 4 }} -roleRef: - kind: ClusterRole - apiGroup: rbac.authorization.k8s.io - name: {{ include "prometheus.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ include "prometheus.fullname" . }} - namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/templates/configmap.yaml b/charts/operator-wandb/old/prometheus/templates/configmap.yaml deleted file mode 100644 index 8338c13c..00000000 --- a/charts/operator-wandb/old/prometheus/templates/configmap.yaml +++ /dev/null @@ -1,93 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "prometheus.fullname" . }}-config - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "prometheus.commonLabels" . | nindent 4 }} - {{- include "prometheus.labels" . | nindent 4 }} -data: - prometheus.yml: | - global: - scrape_interval: 15s - evaluation_interval: 15s - scrape_configs: - - job_name: 'kubernetes-apiservers' - kubernetes_sd_configs: - - role: endpoints - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - relabel_configs: - - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: default;kubernetes;http - - - job_name: 'kubernetes-nodes' - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - kubernetes_sd_configs: - - role: node - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics - - - job_name: 'kube-state-metrics' - static_configs: - - targets: ['kube-state-metrics.kube-system.svc.cluster.local:8080'] - - - job_name: 'kubernetes-cadvisor' - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - kubernetes_sd_configs: - - role: node - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor - - - job_name: 'kubernetes-services-endpoints' - kubernetes_sd_configs: - - role: endpoints - metrics_path: /metrics - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: kubernetes_name \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/templates/deployment.yaml b/charts/operator-wandb/old/prometheus/templates/deployment.yaml deleted file mode 100644 index 140cfb57..00000000 --- a/charts/operator-wandb/old/prometheus/templates/deployment.yaml +++ /dev/null @@ -1,83 +0,0 @@ -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "prometheus.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "prometheus.commonLabels" . | nindent 4 }} - {{- include "prometheus.labels" . | nindent 4 }} - {{- if .Values.deployment.labels -}} - {{- toYaml .Values.deployment.labels | nindent 4 }} - {{- end }} - annotations: - {{- include "wandb.deploymentAnnotations" $ | nindent 4 }} - {{- if .Values.deployment.annotations -}} - {{- toYaml .Values.deployment.annotations | nindent 4 }} - {{- end }} -spec: - replicas: 1 - selector: - matchLabels: - {{- include "wandb.selectorLabels" $ | nindent 6 }} - {{- include "prometheus.labels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "wandb.podLabels" . | nindent 8 }} - {{- include "prometheus.commonLabels" . | nindent 8 }} - {{- include "prometheus.podLabels" . | nindent 8 }} - {{- include "prometheus.labels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- if .Values.pod.annotations -}} - {{- toYaml .Values.pod.annotations | nindent 4 }} - {{- end }} - spec: - serviceAccountName: {{ include "prometheus.fullname" . }} - {{- if .tolerations }} - tolerations: - {{- toYaml .tolerations | nindent 8 }} - {{- end }} - {{- include "wandb.nodeSelector" . | nindent 6 }} - {{- include "wandb.priorityClassName" . | nindent 6 }} - {{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - args: - - --config.file=/etc/prometheus/prometheus.yml - - --storage.tsdb.path=/prometheus/ - ports: - - name: http - containerPort: 9090 - protocol: TCP - env: - - name: HOST - value: "{{ .Values.global.host }}" - - {{- include "prometheus.extraEnv" (dict "global" $.Values.global "local" .Values) | nindent 12 }} - {{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - livenessProbe: - httpGet: - path: /-/healthy - port: http - readinessProbe: - httpGet: - path: /-/healthy - port: http - volumeMounts: - - name: config - mountPath: /etc/prometheus - readOnly: true - - name: storage-volume - mountPath: /prometheus - - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - - name: config - configMap: - name: {{ include "prometheus.fullname" . }}-config - - name: storage-volume - emptyDir: {} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/templates/pvc.yaml b/charts/operator-wandb/old/prometheus/templates/pvc.yaml deleted file mode 100644 index 6c2c72cc..00000000 --- a/charts/operator-wandb/old/prometheus/templates/pvc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "prometheus.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "prometheus.commonLabels" . | nindent 4 }} - {{- include "prometheus.labels" . | nindent 4 }} - annotations: {} -spec: - accessModes: - - ReadWriteOnce - {{ include "wandb.storageClass" . | nindent 4 }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} diff --git a/charts/operator-wandb/old/prometheus/templates/service.yaml b/charts/operator-wandb/old/prometheus/templates/service.yaml deleted file mode 100644 index f0b71fd5..00000000 --- a/charts/operator-wandb/old/prometheus/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "prometheus.fullname" . }} - labels: - {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "prometheus.labels" . | nindent 4 }} - {{- include "prometheus.commonLabels" . | nindent 4 }} - {{- if .Values.service.labels -}} - {{- toYaml .Values.service.labels | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.service.annotations -}} - {{- toYaml .Values.service.annotations | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.service.type }} - ports: - - port: 80 - targetPort: 9090 - protocol: TCP - selector: - {{- include "prometheus.labels" . | nindent 4 }} \ No newline at end of file diff --git a/charts/operator-wandb/old/prometheus/values.yaml b/charts/operator-wandb/old/prometheus/values.yaml deleted file mode 100644 index beab46ad..00000000 --- a/charts/operator-wandb/old/prometheus/values.yaml +++ /dev/null @@ -1,63 +0,0 @@ -enabled: true - -nameOverride: "" -fullnameOverride: "" - -image: - repository: quay.io/prometheus/prometheus - tag: "latest" - pullPolicy: Always - # pullSecrets: [] - -# Tolerations for pod scheduling -tolerations: [] - -extraEnv: {} -extraEnvFrom: {} - -extraCors: [] - -pod: - securityContext: - fsGroup: 0 - fsGroupChangePolicy: "OnRootMismatch" - labels: {} - annotations: {} - -common: - labels: {} - -deployment: - labels: {} - annotations: {} - -service: - type: ClusterIP - annotations: {} - labels: {} - -serviceAccount: - labels: {} - annotations: {} - -resources: - # We usually recommend not to specify default resources and to leave this as a - # conscious choice for the user. This also increases chances charts run on - # environments with little resources, such as Minikube. If you do want to - # specify resources, uncomment the following lines, adjust them as necessary, - # and remove the curly braces after 'resources:'. - requests: - cpu: 500m - memory: 1Gi - limits: - cpu: 4000m - memory: 8Gi - -mysql-exporter: - install: true - -node-exporter: - install: true - -persistence: - size: 16Gi From 5f81c4ed2b7af7ce2ec410f5bb3ca4fbbe33217c Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Thu, 12 Oct 2023 13:50:06 -0400 Subject: [PATCH 2/8] Add redis config --- charts/operator-wandb/Chart.yaml | 2 +- .../charts/parquet/templates/_helpers.tpl | 10 +++++++ .../charts/parquet/templates/deployment.yaml | 29 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index b61b03b7..ac18329e 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.14 +version: 0.10.15 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl index f6c01718..905ac16d 100644 --- a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl +++ b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl @@ -25,6 +25,16 @@ If release name contains chart name it will be used as a full name. {{- end }} {{- end }} +{{- define "parquet.redis" -}} +{{- $cs := include "wandb.redis.connectionString" . }} +{{- $ca := include "wandb.redis.caCert" . }} +{{- if $ca }} +{{- printf "%s?tls=true&caCertPath=/etc/ssl/certs/redis_ca.pem&ttlInSeconds=604800" $cs -}} +{{- else }} +{{- print $cs -}} +{{- end }} +{{- end }} + {{/* Create chart name and version as used by the chart label. */}} diff --git a/charts/operator-wandb/charts/parquet/templates/deployment.yaml b/charts/operator-wandb/charts/parquet/templates/deployment.yaml index d48dc7ed..97ba2e29 100644 --- a/charts/operator-wandb/charts/parquet/templates/deployment.yaml +++ b/charts/operator-wandb/charts/parquet/templates/deployment.yaml @@ -44,6 +44,12 @@ spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + volumeMounts: + {{- if ne (include "wandb.redis.caCert" .) "" }} + - name: {{ include "parquet.fullname" . }}-redis-ca + mountPath: /etc/ssl/certs/redis_ca.pem + subPath: redis_ca.pem + {{- end }} ports: - name: parquet containerPort: 8087 @@ -55,6 +61,20 @@ spec: - name: LOGGING_ENABLED value: 'true' + {{- if ne (include "wandb.redis.password" .) "" }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "wandb.redis.passwordSecret" . }} + key: REDIS_PASSWORD + {{- end }} + - name: REDIS_PORT + value: "{{ include "wandb.redis.port" . }}" + - name: REDIS_HOST + value: "{{ include "wandb.redis.host" . }}" + - name: REDIS + value: "{{ include "parquet.redis" . | trim }}" + - name: MYSQL_PORT value: "{{ include "wandb.mysql.port" . }}" - name: MYSQL_HOST @@ -85,4 +105,13 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} + volumes: + {{- if ne (include "wandb.redis.caCert" .) "" }} + - name: {{ include "app.fullname" . }}-redis-ca + secret: + secretName: "{{ include "wandb.redis.passwordSecret" . }}" + items: + - key: REDIS_CA_CERT + path: redis_ca.pem + {{- end }} {{- end }} \ No newline at end of file From f209402e7f5494a24f49e1555b3dabbbca1a6d43 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Thu, 12 Oct 2023 13:57:40 -0400 Subject: [PATCH 3/8] add gorilla cache option --- charts/operator-wandb/Chart.yaml | 2 +- charts/operator-wandb/charts/parquet/templates/_helpers.tpl | 6 +++++- .../operator-wandb/charts/parquet/templates/deployment.yaml | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index ac18329e..b206fe62 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.15 +version: 0.10.16 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl index 905ac16d..fd15e9b7 100644 --- a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl +++ b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl @@ -110,7 +110,7 @@ app deployments. {{- end }} {{- end -}} -{{- define "parquet.bucket" -}} +{{- define "app.bucket" -}} {{- if eq .Values.global.bucket.provider "az" }} {{- printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}} {{- end }} @@ -118,6 +118,10 @@ app deployments. {{- printf "gs://%s" .Values.global.bucket.name -}} {{- end }} {{- if eq .Values.global.bucket.provider "s3" }} +{{- if and .Values.global.bucket.accessKey .Values.global.bucket.secretKey}} +{{- printf "s3://%s:%s@%s" .Values.global.bucket.accessKey .Values.global.bucket.secretKey .Values.global.bucket.name -}} +{{- else }} {{- printf "s3://%s" .Values.global.bucket.name -}} {{- end }} {{- end }} +{{- end }} diff --git a/charts/operator-wandb/charts/parquet/templates/deployment.yaml b/charts/operator-wandb/charts/parquet/templates/deployment.yaml index 97ba2e29..f018b3d6 100644 --- a/charts/operator-wandb/charts/parquet/templates/deployment.yaml +++ b/charts/operator-wandb/charts/parquet/templates/deployment.yaml @@ -75,6 +75,12 @@ spec: - name: REDIS value: "{{ include "parquet.redis" . | trim }}" + - name: BUCKET + value: "{{ include "parquet.bucket" . }}" + + - name: GORILLA_ACTIVITY_STORE_CACHE_ADDRESS + value: "{{ include "parquet.redis" . | trim }}" + - name: MYSQL_PORT value: "{{ include "wandb.mysql.port" . }}" - name: MYSQL_HOST From d51b3e7ebeaf7daacdd791018a8091c2181f9936 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Thu, 12 Oct 2023 13:59:03 -0400 Subject: [PATCH 4/8] Correct bucket func call --- charts/operator-wandb/Chart.yaml | 2 +- charts/operator-wandb/charts/parquet/templates/_helpers.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index b206fe62..30cc5874 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.16 +version: 0.10.17 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl index fd15e9b7..9538266b 100644 --- a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl +++ b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl @@ -110,7 +110,7 @@ app deployments. {{- end }} {{- end -}} -{{- define "app.bucket" -}} +{{- define "parquet.bucket" -}} {{- if eq .Values.global.bucket.provider "az" }} {{- printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}} {{- end }} From 976337c01b33a01cd680e3ffabcad37c60063804 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Thu, 12 Oct 2023 14:13:30 -0400 Subject: [PATCH 5/8] Remove parquet form app --- charts/operator-wandb/Chart.yaml | 2 +- .../charts/app/templates/deployment.yaml | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index 30cc5874..b52baa7a 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.17 +version: 0.10.18 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/app/templates/deployment.yaml b/charts/operator-wandb/charts/app/templates/deployment.yaml index 8e317321..fe90938b 100644 --- a/charts/operator-wandb/charts/app/templates/deployment.yaml +++ b/charts/operator-wandb/charts/app/templates/deployment.yaml @@ -101,6 +101,17 @@ spec: - name: MYSQL value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)" + # - name: WEAVE_SERVICE + # value: "{{ .Release.Name }}-weave:9994" + # - name: PARQUET_ENABLED + # value: "true" + # - name: WEAVE_SERVICE + # value: "{{ .Release.Name }}-weave:9994" + # - name: PARQUET_HOST + # value: "http://{{ .Release.Name }}-parquet:8087" + # - name: PARQUET_ENABLED + # value: "true" + {{- if ne (include "wandb.redis.password" .) "" }} - name: REDIS_PASSWORD valueFrom: @@ -115,14 +126,6 @@ spec: - name: REDIS value: "{{ include "app.redis" . | trim }}" - - name: WEAVE_SERVICE - value: "{{ .Release.Name }}-weave:9994" - - - name: PARQUET_HOST - value: "http://{{ .Release.Name }}-parquet:8087" - - name: PARQUET_ENABLED - value: "true" - - name: SLACK_CLIENT_ID value: {{ .Values.global.slack.clientId }} - name: SLACK_SECRET From 48e8d902931fe1b7e0a3f6773d79d06208a7e127 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Thu, 12 Oct 2023 14:35:14 -0400 Subject: [PATCH 6/8] disable parquet by default --- charts/operator-wandb/Chart.yaml | 2 +- charts/operator-wandb/values.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index b52baa7a..d1546473 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.18 +version: 0.10.19 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/values.yaml b/charts/operator-wandb/values.yaml index 2d43ab8a..414fcf71 100644 --- a/charts/operator-wandb/values.yaml +++ b/charts/operator-wandb/values.yaml @@ -86,7 +86,7 @@ ingress: email: support@wandb.com parquet: - install: true + install: false image: repository: wandb/local tag: latest @@ -98,7 +98,7 @@ app: tag: latest weave: - install: true + install: false # # azurefile, filestore # provider: "" storageClass: "" From ab4eb777ece56f1d7ffab58be71eb779442e4af3 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Thu, 12 Oct 2023 14:52:50 -0400 Subject: [PATCH 7/8] Set parquet --- charts/operator-wandb/Chart.yaml | 2 +- .../charts/app/templates/deployment.yaml | 16 ++--- .../charts/parquet/templates/deployment.yaml | 68 +++++++++++++------ .../charts/parquet/templates/service.yaml | 10 ++- charts/operator-wandb/values.yaml | 4 +- 5 files changed, 62 insertions(+), 38 deletions(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index d1546473..4c4d208d 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.19 +version: 0.10.20 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/app/templates/deployment.yaml b/charts/operator-wandb/charts/app/templates/deployment.yaml index fe90938b..a206cacf 100644 --- a/charts/operator-wandb/charts/app/templates/deployment.yaml +++ b/charts/operator-wandb/charts/app/templates/deployment.yaml @@ -101,16 +101,12 @@ spec: - name: MYSQL value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)" - # - name: WEAVE_SERVICE - # value: "{{ .Release.Name }}-weave:9994" - # - name: PARQUET_ENABLED - # value: "true" - # - name: WEAVE_SERVICE - # value: "{{ .Release.Name }}-weave:9994" - # - name: PARQUET_HOST - # value: "http://{{ .Release.Name }}-parquet:8087" - # - name: PARQUET_ENABLED - # value: "true" + - name: WEAVE_SERVICE + value: "{{ .Release.Name }}-weave:9994" + - name: PARQUET_HOST + value: "http://{{ .Release.Name }}-parquet:8087" + - name: PARQUET_ENABLED + value: "true" {{- if ne (include "wandb.redis.password" .) "" }} - name: REDIS_PASSWORD diff --git a/charts/operator-wandb/charts/parquet/templates/deployment.yaml b/charts/operator-wandb/charts/parquet/templates/deployment.yaml index f018b3d6..29af2004 100644 --- a/charts/operator-wandb/charts/parquet/templates/deployment.yaml +++ b/charts/operator-wandb/charts/parquet/templates/deployment.yaml @@ -55,12 +55,39 @@ spec: containerPort: 8087 protocol: TCP env: + - name: HOST + value: "{{ .Values.global.host }}" + + {{- if .Values.extraCors }} + - name: GORILLA_CORS_ORIGINS + value: "{{ join "," .Values.extraCors }}" + {{- end }} + - name: ONLY_SERVICE value: gorilla-parquet - name: LOGGING_ENABLED value: 'true' + - name: MYSQL_PORT + value: "{{ include "wandb.mysql.port" . }}" + - name: MYSQL_HOST + value: "{{ include "wandb.mysql.host" . }}" + - name: MYSQL_DATABASE + value: "{{ include "wandb.mysql.database" . }}" + - name: MYSQL_USER + value: "{{ include "wandb.mysql.user" . }}" + - name: MYSQL_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "wandb.mysql.passwordSecret" . }} + key: MYSQL_PASSWORD + - name: MYSQL + value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)" + + - name: WEAVE_SERVICE + value: "{{ .Release.Name }}-weave:9994" + {{- if ne (include "wandb.redis.password" .) "" }} - name: REDIS_PASSWORD valueFrom: @@ -75,27 +102,24 @@ spec: - name: REDIS value: "{{ include "parquet.redis" . | trim }}" - - name: BUCKET - value: "{{ include "parquet.bucket" . }}" - - - name: GORILLA_ACTIVITY_STORE_CACHE_ADDRESS - value: "{{ include "parquet.redis" . | trim }}" - - - name: MYSQL_PORT - value: "{{ include "wandb.mysql.port" . }}" - - name: MYSQL_HOST - value: "{{ include "wandb.mysql.host" . }}" - - name: MYSQL_DATABASE - value: "{{ include "wandb.mysql.database" . }}" - - name: MYSQL_USER - value: "{{ include "wandb.mysql.user" . }}" - - name: MYSQL_PASSWORD + - name: LICENSE valueFrom: secretKeyRef: - name: {{ include "wandb.mysql.passwordSecret" . }} - key: MYSQL_PASSWORD - - name: MYSQL - value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)" + name: {{ include "app.fullname" . }}-config + key: LICENSE + optional: true + - name: GORILLA_LICENSE + valueFrom: + secretKeyRef: + name: {{ include "app.fullname" . }}-config + key: LICENSE + optional: true + - name: GORILLA_SETTINGS_CACHE + valueFrom: + secretKeyRef: + name: {{ include "app.fullname" . }}-config + key: LICENSE + optional: true - name: BUCKET value: "{{ include "parquet.bucket" . }}" @@ -105,6 +129,12 @@ spec: value: {{ .Values.global.bucket.region }} - name: AWS_S3_KMS_ID value: "{{ .Values.global.bucket.kmsKey }}" + - name: AZURE_STORAGE_KEY + valueFrom: + secretKeyRef: + name: "{{ include "wandb.bucket.secret" . }}" + key: ACCESS_KEY + optional: true {{- include "parquet.extraEnv" (dict "global" .Values.global "local" .Values) | nindent 12 }} {{- include "wandb.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} diff --git a/charts/operator-wandb/charts/parquet/templates/service.yaml b/charts/operator-wandb/charts/parquet/templates/service.yaml index c6242f4b..5068a003 100644 --- a/charts/operator-wandb/charts/parquet/templates/service.yaml +++ b/charts/operator-wandb/charts/parquet/templates/service.yaml @@ -1,12 +1,11 @@ -{{- if .Values.enabled }} apiVersion: v1 kind: Service metadata: - name: {{ include "weave.fullname" . }} + name: {{ include "parquet.fullname" . }} labels: {{- include "wandb.commonLabels" . | nindent 4 }} - {{- include "weave.labels" . | nindent 4 }} - {{- include "weave.commonLabels" . | nindent 4 }} + {{- include "parquet.labels" . | nindent 4 }} + {{- include "parquet.commonLabels" . | nindent 4 }} {{- if .Values.service.labels -}} {{- toYaml .Values.service.labels | nindent 4 }} {{- end }} @@ -21,5 +20,4 @@ spec: protocol: TCP name: parquet selector: - {{- include "weave.labels" . | nindent 4 }} -{{- end }} \ No newline at end of file + {{- include "parquet.labels" . | nindent 4 }} \ No newline at end of file diff --git a/charts/operator-wandb/values.yaml b/charts/operator-wandb/values.yaml index 414fcf71..2d43ab8a 100644 --- a/charts/operator-wandb/values.yaml +++ b/charts/operator-wandb/values.yaml @@ -86,7 +86,7 @@ ingress: email: support@wandb.com parquet: - install: false + install: true image: repository: wandb/local tag: latest @@ -98,7 +98,7 @@ app: tag: latest weave: - install: false + install: true # # azurefile, filestore # provider: "" storageClass: "" From c117330ef3f8d917d6f48e946521241b76b1eb5b Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Fri, 13 Oct 2023 10:19:57 -0400 Subject: [PATCH 8/8] Option to set service account name --- charts/operator-wandb/Chart.yaml | 2 +- .../charts/app/templates/deployment.yaml | 2 +- .../charts/app/templates/serviceaccount.yaml | 2 +- charts/operator-wandb/charts/app/values.yaml | 4 ++- .../charts/parquet/templates/deployment.yaml | 31 ++----------------- 5 files changed, 8 insertions(+), 33 deletions(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index 4c4d208d..85523e42 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.20 +version: 0.10.21 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/charts/app/templates/deployment.yaml b/charts/operator-wandb/charts/app/templates/deployment.yaml index a206cacf..786f8fee 100644 --- a/charts/operator-wandb/charts/app/templates/deployment.yaml +++ b/charts/operator-wandb/charts/app/templates/deployment.yaml @@ -34,7 +34,7 @@ spec: {{- toYaml .Values.pod.annotations | nindent 4 }} {{- end }} spec: - serviceAccountName: {{ include "app.fullname" . }} + serviceAccountName: {{ include "app.serviceAccountName" . }} {{- if .tolerations }} tolerations: {{- toYaml .tolerations | nindent 8 }} diff --git a/charts/operator-wandb/charts/app/templates/serviceaccount.yaml b/charts/operator-wandb/charts/app/templates/serviceaccount.yaml index d187e6bb..c3824d12 100644 --- a/charts/operator-wandb/charts/app/templates/serviceaccount.yaml +++ b/charts/operator-wandb/charts/app/templates/serviceaccount.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "app.fullname" . }} + name: {{ include "app.serviceAccountName" . }} namespace: {{ $.Release.Namespace }} labels: {{- include "wandb.commonLabels" . | nindent 4 }} diff --git a/charts/operator-wandb/charts/app/values.yaml b/charts/operator-wandb/charts/app/values.yaml index 1b5cd306..1b548638 100644 --- a/charts/operator-wandb/charts/app/values.yaml +++ b/charts/operator-wandb/charts/app/values.yaml @@ -50,6 +50,8 @@ resources: cpu: 4000m memory: 8Gi -serviceAccount: {} +serviceAccount: + create: true + role: {} roleBinding: {} diff --git a/charts/operator-wandb/charts/parquet/templates/deployment.yaml b/charts/operator-wandb/charts/parquet/templates/deployment.yaml index 29af2004..9d3748ae 100644 --- a/charts/operator-wandb/charts/parquet/templates/deployment.yaml +++ b/charts/operator-wandb/charts/parquet/templates/deployment.yaml @@ -55,14 +55,6 @@ spec: containerPort: 8087 protocol: TCP env: - - name: HOST - value: "{{ .Values.global.host }}" - - {{- if .Values.extraCors }} - - name: GORILLA_CORS_ORIGINS - value: "{{ join "," .Values.extraCors }}" - {{- end }} - - name: ONLY_SERVICE value: gorilla-parquet @@ -85,9 +77,6 @@ spec: - name: MYSQL value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)" - - name: WEAVE_SERVICE - value: "{{ .Release.Name }}-weave:9994" - {{- if ne (include "wandb.redis.password" .) "" }} - name: REDIS_PASSWORD valueFrom: @@ -102,24 +91,8 @@ spec: - name: REDIS value: "{{ include "parquet.redis" . | trim }}" - - name: LICENSE - valueFrom: - secretKeyRef: - name: {{ include "app.fullname" . }}-config - key: LICENSE - optional: true - - name: GORILLA_LICENSE - valueFrom: - secretKeyRef: - name: {{ include "app.fullname" . }}-config - key: LICENSE - optional: true - name: GORILLA_SETTINGS_CACHE - valueFrom: - secretKeyRef: - name: {{ include "app.fullname" . }}-config - key: LICENSE - optional: true + value: "{{ include "parquet.redis" . | trim }}" - name: BUCKET value: "{{ include "parquet.bucket" . }}" @@ -143,7 +116,7 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumes: {{- if ne (include "wandb.redis.caCert" .) "" }} - - name: {{ include "app.fullname" . }}-redis-ca + - name: {{ include "parquet.fullname" . }}-redis-ca secret: secretName: "{{ include "wandb.redis.passwordSecret" . }}" items: