Skip to content

Commit

Permalink
Add pvc to weave
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Aug 27, 2023
1 parent 7b8aaaa commit 2613abd
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion charts/operator-wandb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: operator-wandb
description: A Helm chart for deploying W&B to Kubernetes
type: application
version: 0.2.0
version: 0.3.0
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg
maintainers:
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion charts/operator-wandb/charts/mysql/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
spec:
accessModes:
- ReadWriteOnce
{{ include "wandb.storageClass" . | nindent 4 }}
{{ include "wandb.storageClass" .Values.persistence | nindent 4 }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ spec:
subPath: my.cnf
resources:
{{- toYaml .Values.resources | nindent 12 }}

volumes:
- name: initdb
configMap:
Expand Down
Empty file.
8 changes: 8 additions & 0 deletions charts/operator-wandb/charts/weave/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,12 @@ spec:

resources:
{{- toYaml .Values.resources | nindent 12 }}

volumeMounts:
- name: cache
mountPath: /vol/weave/cache
volumes:
- name: cache
persistentVolumeClaim:
claimName: {{ template "weave.fullname" . }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/operator-wandb/charts/weave/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "weave.fullname" . }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "wandb.commonLabels" . | nindent 4 }}
{{- include "weave.commonLabels" . | nindent 4 }}
{{- include "weave.labels" . | nindent 4 }}
spec:
accessModes: [ReadWriteOnce]
{{ include "wandb.storageClass" . | nindent 4 }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
4 changes: 4 additions & 0 deletions charts/operator-wandb/charts/weave/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ resources:
limits:
cpu: 8
memory: 16Gi

persistence:
# storageClassName: ""
size: 20Gi
4 changes: 2 additions & 2 deletions charts/operator-wandb/templates/_storage.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "wandb.storageClass" -}}
{{- if .Values.storageClass -}}
{{- if (ne .Values.storageClass "") -}}
{{- if .Values.persistence.storageClass -}}
{{- if (ne .Values.persistence.storageClass "") -}}
{{- printf "storageClassName: %s" .Values.storageClass -}}
{{- end -}}
{{- else if .Values.global.storageClass -}}
Expand Down
10 changes: 5 additions & 5 deletions charts/operator-wandb/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ metadata:
name: {{ .Release.Name }}
labels:
{{- include "wandb.commonLabels" . | nindent 4 }}
{{- if .Values.ingress.labels -}}
{{- toYaml .Values.ingress.labels | nindent 4 }}
{{- if .Values.global.ingress.labels -}}
{{- toYaml .Values.global.ingress.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.ingress.annotations -}}
{{- toYaml .Values.ingress.annotations | nindent 4 }}
{{- if .Values.global.ingress.annotations -}}
{{- toYaml .Values.global.ingress.annotations | nindent 4 }}
{{- end }}
spec:
rules:
Expand All @@ -24,7 +24,7 @@ spec:
number: 8082
defaultBackend:
service:
{{- if eq .Values.ingress.defaultBackend "console" }}
{{- if eq .Values.global.ingress.defaultBackend "console" }}
name: {{ .Release.Name }}-console
port:
number: 8082
Expand Down
11 changes: 6 additions & 5 deletions charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ global:
host: "http://localhost:8080"

storageClass: ""

common:
labels: {}
annotations: {}
Expand Down Expand Up @@ -60,6 +61,11 @@ global:
parameters: {}
caCert: ""

ingress:
defaultBackend: "app"
annotations: {}
labels: {}

parquet:
install: true
image:
Expand Down Expand Up @@ -93,10 +99,5 @@ mysql:
redis:
install: true

ingress:
defaultBackend: "app"
annotations: {}
labels: {}

nameOverride: ""
fullnameOverride: ""

0 comments on commit 2613abd

Please sign in to comment.