Skip to content

Commit

Permalink
Convert to StatefulSet
Browse files Browse the repository at this point in the history
  • Loading branch information
ph1ll committed Nov 28, 2024
1 parent a11c65b commit 625121a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 24 deletions.
17 changes: 0 additions & 17 deletions charts/netbird/charts/management/templates/pvc.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "management.fullname" . }}
labels:
Expand Down Expand Up @@ -66,21 +66,18 @@ spec:
name: config
readOnly: true
- mountPath: /var/lib/netbird
name: data
name: {{ include "management.fullname" . }}-data
- mountPath: /tmp
name: tmp
volumes:
- name: config
secret:
secretName: {{ .Values.config.existingSecret }}
{{- if not .Values.persistence.enabled }}
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "management.fullname" . }}-data
{{- else }}
emptyDir:
medium: Memory
{{- end }}
{{- end }}
- name: tmp
emptyDir:
medium: Memory
Expand All @@ -96,3 +93,17 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: {{ include "management.fullname" . }}-data
spec:
{{- if .Values.persistence.storageClassName }}
storageClassName: "{{- .Values.persistence.storageClassName }}"
{{- end }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "{{ .Values.persistence.size | default "1Gi" }}"
{{- end }}

0 comments on commit 625121a

Please sign in to comment.