- 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
111 lines
3.8 KiB
YAML
111 lines
3.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ include "rustical.fullname" . }}
|
|
labels:
|
|
{{- include "rustical.labels" . | nindent 4 }}
|
|
spec:
|
|
serviceName: {{ include "rustical.fullname" . }}-headless
|
|
{{- if not .Values.rustical.autoscaling.enabled }}
|
|
replicas: {{ .Values.rustical.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "rustical.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.rustical.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "rustical.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.rustical.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.rustical.podSecurityContext | nindent 8 }}
|
|
{{- if .Values.rustical.debug.enabled }}
|
|
initContainers:
|
|
- name: debug
|
|
image: alpine:3.19
|
|
command: ["sleep", "infinity"]
|
|
envFrom:
|
|
- secretRef:
|
|
name: {{ .Values.rustical.secret.existingSecretName }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /var/lib/rustical
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: false
|
|
capabilities:
|
|
drop:
|
|
- all
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.rustical.securityContext | nindent 12 }}
|
|
image: "{{ .Values.rustical.image.repository }}:{{ .Values.rustical.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.rustical.image.pullpolicy }}
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ include "rustical.fullname" . }}-config
|
|
- secretRef:
|
|
name: {{ .Values.rustical.secret.existingSecretName | default (include "rustical.fullname" .) }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 4000
|
|
protocol: TCP
|
|
{{- if not .Values.rustical.debug.enabled }}
|
|
livenessProbe:
|
|
{{- toYaml .Values.rustical.livenessProbe | nindent 12 }}
|
|
readinessProbe:
|
|
{{- toYaml .Values.rustical.readinessProbe | nindent 12 }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.rustical.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /var/lib/rustical
|
|
{{- if .Values.rustical.persistence.existingClaim }}
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.rustical.persistence.existingClaim }}
|
|
{{- end }}
|
|
{{- with .Values.rustical.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.rustical.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.rustical.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
restartPolicy: Always
|
|
automountServiceAccountToken: false
|
|
{{- if and .Values.rustical.persistence.enabled (not .Values.rustical.persistence.existingClaim) }}
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: data
|
|
spec:
|
|
accessModes:
|
|
- {{ .Values.rustical.persistence.accessMode }}
|
|
{{- if .Values.rustical.persistence.storageClass }}
|
|
{{- if eq "-" .Values.rustical.persistence.storageClass }}
|
|
storageClassName: ""
|
|
{{- else }}
|
|
storageClassName: {{ .Values.rustical.persistence.storageClass | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.rustical.persistence.size }}
|
|
{{- end }}
|