fukuops/k8s/charts/dokuwiki/templates/statefulset.yaml
cătălin 1fd2bfef3d
feat(helm): complete chart normalization with ConfigMap, HPA, and OCI migration
- Added debug mode, structured ConfigMap pattern, and README to all charts
- Migrated all flat-structure charts to hierarchical values under chartname key
- Fixed templates to use correct hierarchical paths
- Renamed helm-rustical key to rustical, added HPA support
- Fixed ingress YAML parsing (oxicloud), nested env vars (rustical)
- Pushed all normalized charts to OCI registry as 1.0.0+ and updated ArgoCD apps
2026-08-14 09:35:19 +02:00

89 lines
3 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "dokuwiki.fullname" . }}
labels:
{{- include "dokuwiki.labels" . | nindent 4 }}
spec:
serviceName: {{ include "dokuwiki.fullname" . }}-headless
{{- if not .Values.dokuwiki.autoscaling.enabled }}
replicas: {{ .Values.dokuwiki.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "dokuwiki.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.dokuwiki.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "dokuwiki.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.dokuwiki.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.dokuwiki.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.dokuwiki.securityContext | nindent 12 }}
image: "{{ .Values.dokuwiki.image.repository }}:{{ .Values.dokuwiki.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.dokuwiki.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "dokuwiki.fullname" . }}-config
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
{{- toYaml .Values.dokuwiki.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.dokuwiki.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.dokuwiki.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /storage
{{- if .Values.dokuwiki.persistence.existingClaim }}
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ .Values.dokuwiki.persistence.existingClaim }}
{{- end }}
{{- with .Values.dokuwiki.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dokuwiki.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dokuwiki.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: Always
automountServiceAccountToken: false
{{- if and .Values.dokuwiki.persistence.enabled (not .Values.dokuwiki.persistence.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- {{ .Values.dokuwiki.persistence.accessMode }}
{{- if .Values.dokuwiki.persistence.storageClass }}
{{- if eq "-" .Values.dokuwiki.persistence.storageClass }}
storageClassName: ""
{{- else }}
storageClassName: {{ .Values.dokuwiki.persistence.storageClass | quote }}
{{- end }}
{{- end }}
resources:
requests:
storage: {{ .Values.dokuwiki.persistence.size }}
{{- end }}