diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index 7881d0e1..023496b7 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.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 5936e927..786f8fee 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.serviceAccountName" . }} {{- if .tolerations }} tolerations: {{- toYaml .tolerations | nindent 8 }} @@ -100,6 +101,13 @@ 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_HOST + value: "http://{{ .Release.Name }}-parquet:8087" + - name: PARQUET_ENABLED + value: "true" + {{- if ne (include "wandb.redis.password" .) "" }} - name: REDIS_PASSWORD valueFrom: @@ -114,14 +122,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 @@ -175,6 +175,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..c3824d12 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.serviceAccountName" . }} 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..1b548638 100644 --- a/charts/operator-wandb/charts/app/values.yaml +++ b/charts/operator-wandb/charts/app/values.yaml @@ -49,3 +49,9 @@ resources: limits: cpu: 4000m memory: 8Gi + +serviceAccount: + create: true + +role: {} +roleBinding: {} diff --git a/charts/operator-wandb/charts/parquet/templates/_helpers.tpl b/charts/operator-wandb/charts/parquet/templates/_helpers.tpl index f6c01718..9538266b 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. */}} @@ -108,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 d48dc7ed..9d3748ae 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 @@ -71,6 +77,23 @@ spec: - name: MYSQL value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)" + {{- 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: GORILLA_SETTINGS_CACHE + value: "{{ include "parquet.redis" . | trim }}" + - name: BUCKET value: "{{ include "parquet.bucket" . }}" - name: BUCKET_QUEUE @@ -79,10 +102,25 @@ 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 }} resources: {{- toYaml .Values.resources | nindent 12 }} + volumes: + {{- if ne (include "wandb.redis.caCert" .) "" }} + - name: {{ include "parquet.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/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/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