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
This commit is contained in:
cătălin 2026-08-14 09:35:19 +02:00
commit 1fd2bfef3d
No known key found for this signature in database
71 changed files with 2150 additions and 965 deletions

View file

@ -0,0 +1,13 @@
{{- if .Values.rustical.config }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "rustical.fullname" . }}-config
labels:
{{- include "rustical.labels" . | nindent 4 }}
data:
{{- range $key, $value := .Values.rustical.config }}
{{- $envKey := printf "RUSTICAL_%s" ($key | upper | replace "." "__" | replace "-" "_") }}
{{ $envKey }}: {{ $value | quote }}
{{- end }}
{{- end }}

View file

@ -0,0 +1,36 @@
{{- if .Values.rustical.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "rustical.fullname" . }}
labels:
{{- include "rustical.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: {{ include "rustical.fullname" . }}
{{- if .Values.rustical.autoscaling.minReplicas }}
minReplicas: {{ .Values.rustical.autoscaling.minReplicas }}
{{- end }}
{{- if .Values.rustical.autoscaling.maxReplicas }}
maxReplicas: {{ .Values.rustical.autoscaling.maxReplicas }}
{{- end }}
metrics:
{{- if .Values.rustical.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.rustical.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.rustical.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.rustical.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View file

@ -1,23 +1,23 @@
{{- if .Values.ingress.enabled -}}
{{- if .Values.rustical.ingress.enabled -}}
{{- $fullName := include "rustical.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- $svcPort := .Values.rustical.service.port -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "rustical.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
{{- with .Values.rustical.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.rustical.ingress.className }}
ingressClassName: {{ .Values.rustical.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
{{- if .Values.rustical.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
{{- range .Values.rustical.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
@ -26,7 +26,7 @@ spec:
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
{{- range .Values.rustical.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:

View file

@ -5,10 +5,10 @@ metadata:
labels:
{{- include "rustical.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
type: {{ .Values.rustical.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
- port: {{ .Values.rustical.service.port }}
targetPort: {{ .Values.rustical.service.targetPort }}
protocol: TCP
name: http
selector:

View file

@ -6,40 +6,35 @@ metadata:
{{- include "rustical.labels" . | nindent 4 }}
spec:
serviceName: {{ include "rustical.fullname" . }}-headless
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- if not .Values.rustical.autoscaling.enabled }}
replicas: {{ .Values.rustical.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "rustical.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
{{- with .Values.rustical.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "rustical.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
{{- with .Values.rustical.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.debug.enabled }}
{{- 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.secret.existingSecretName }}
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
name: {{ .Values.rustical.secret.existingSecretName }}
volumeMounts:
- name: data
mountPath: /var/lib/rustical
@ -53,67 +48,64 @@ spec:
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullpolicy }}
{{- 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.secret.existingSecretName | default (include "rustical.fullname" .) }}
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
name: {{ .Values.rustical.secret.existingSecretName | default (include "rustical.fullname" .) }}
ports:
- name: http
containerPort: 4000
protocol: TCP
{{- if not .Values.debug.enabled }}
{{- if not .Values.rustical.debug.enabled }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- toYaml .Values.rustical.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- toYaml .Values.rustical.readinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.rustical.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /var/lib/rustical
{{- if .Values.persistence.existingClaim }}
{{- if .Values.rustical.persistence.existingClaim }}
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
claimName: {{ .Values.rustical.persistence.existingClaim }}
{{- end }}
{{- with .Values.nodeSelector }}
{{- with .Values.rustical.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.rustical.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.rustical.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: Always
automountServiceAccountToken: false
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
{{- if and .Values.rustical.persistence.enabled (not .Values.rustical.persistence.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- {{ .Values.persistence.accessMode }}
{{- if .Values.persistence.storageClass }}
{{- if eq "-" .Values.persistence.storageClass }}
- {{ .Values.rustical.persistence.accessMode }}
{{- if .Values.rustical.persistence.storageClass }}
{{- if eq "-" .Values.rustical.persistence.storageClass }}
storageClassName: ""
{{- else }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
storageClassName: {{ .Values.rustical.persistence.storageClass | quote }}
{{- end }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size }}
storage: {{ .Values.rustical.persistence.size }}
{{- end }}