Skip to content

Commit

Permalink
Try upgrading kind, use a PV when not connected to bucket, mysql fsGr…
Browse files Browse the repository at this point in the history
…oup attempt
  • Loading branch information
vanpelt committed May 26, 2022
1 parent 5b23f5d commit 5263673
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:

- name: Create kind cluster
uses: helm/[email protected]
with:
version: v0.14.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
Expand Down
4 changes: 4 additions & 0 deletions charts/wandb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ If release name contains chart name it will be used as a full name.
{{- end }}
{{- end }}

{{- define "wandb.volumeClaim" -}}
{{- printf "%s-vol" (include "wandb.fullname" .) -}}
{{- end }}

{{- define "wandb.mysqlHost" -}}
{{- printf "%s-mysql.%s.svc.cluster.local" (include "wandb.fullname" .) .Release.Namespace }}
{{- end }}
Expand Down
25 changes: 22 additions & 3 deletions charts/wandb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ spec:
httpGet:
path: /ready
port: http
failureThreshold: 60
failureThreshold: 120
{{- if not .Values.bucket }}
volumeMounts:
- name: wandb-data
Expand All @@ -134,8 +134,27 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if not .Values.bucket }}
{{- if or (not .Values.bucket) .Values.existingClaim }}
volumes:
- name: wandb-data
emptyDir: {}
persistentVolumeClaim:
claimName: {{ .Values.existingClaim | default (include "wandb.volumeClaim" .) }}
{{- end }}
---
{{- if and (not .Values.bucket) (not .Values.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "wandb.volumeClaim" . }}
annotations:
"helm.sh/resource-policy": keep
labels:
{{- include "wandb.labels" . | nindent 4 }}
app.kubernetes.io/component: local
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 64Gi
{{- end }}
6 changes: 5 additions & 1 deletion charts/wandb/templates/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "wandb.serviceAccountName" . }}
# TODO: security context
# TODO: flexible security context
securityContext:
runAsNonRoot: false
fsGroup: 27
fsGroupChangePolicy: "OnRootMismatch"
initContainers:
- name: "remove-lost-found"
image: "busybox"
Expand Down
2 changes: 2 additions & 0 deletions charts/wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ bucketKmsKeyArn:
smtpServer:
# when setting up an ingress, set this to http://domain.com or https://domain.com
host:
# If you aren't connected to an external bucket and want to mount a custom claim for minio
existingClaim:

# set additional env variables
extraEnv:
Expand Down
2 changes: 1 addition & 1 deletion ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ chart-dirs:
- charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
helm-extra-args: --timeout 900s
helm-extra-args: --timeout 600s

0 comments on commit 5263673

Please sign in to comment.