Skip to content

Commit

Permalink
Allow switching between Deployment and StatefulSet controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
darnaut committed Oct 2, 2024
1 parent 0191b9a commit 7aed1e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/datahub-executor-worker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: datahub-executor-worker
description: A Helm chart for datahub-executor-worker
type: application
version: 0.0.7
version: 0.0.8
appVersion: 0.0.1
maintainers:
- name: DataHub
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: StatefulSet
kind: {{ .Values.workloadKind }}
metadata:
name: {{ include "datahub-executor-worker.fullname" . }}
labels:
Expand All @@ -13,6 +13,9 @@ spec:
matchLabels:
{{- include "datahub-executor-worker.selectorLabels" . | nindent 6 }}
{{- if .Values.persistentVolume.enabled }}
{{- if ne .Values.workloadKind "StatefulSet" }}
{{- fail "workloadKind must be set to StatefulSet when persistent volume is enabled" }}
{{- end }}
volumeClaimTemplates:
- metadata:
{{- with .Values.persistentVolume.annotations }}
Expand Down
3 changes: 3 additions & 0 deletions charts/datahub-executor-worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ global:
monitors:
max_workers: 10

workloadKind: Deployment

replicaCount: 1

revisionHistoryLimit: 1
Expand Down Expand Up @@ -93,6 +95,7 @@ readinessProbe:
timeoutSeconds: 5

persistentVolume:
# Requires workloadKind: StatefulSet
enabled: false
accessModes:
- ReadWriteOnce
Expand Down

0 comments on commit 7aed1e6

Please sign in to comment.