From 84649ebb1733c3e6cda614fed302b7bc9c95dd52 Mon Sep 17 00:00:00 2001 From: jklein Date: Wed, 8 Apr 2026 11:33:06 +0200 Subject: [PATCH] feat(template-chart): added secrets and storage --- template-chart/templates/xxx.deployment.yaml | 4 +--- template-chart/templates/xxx.ingress.yaml | 2 ++ template-chart/templates/xxx.pvc.yaml | 13 +++++++++++++ template-chart/templates/xxx.secret.yaml | 6 ++++++ template-chart/values.yaml | 9 ++++++++- 5 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 template-chart/templates/xxx.pvc.yaml create mode 100644 template-chart/templates/xxx.secret.yaml diff --git a/template-chart/templates/xxx.deployment.yaml b/template-chart/templates/xxx.deployment.yaml index b865bce..db5b01b 100644 --- a/template-chart/templates/xxx.deployment.yaml +++ b/template-chart/templates/xxx.deployment.yaml @@ -31,10 +31,8 @@ spec: protocol: TCP name: http # TODO: Add liveness and readiness probes - {{- with .Values.xxx.resources }} resources: - {{ toYaml . | nindent 12 }} - {{- end }} + {{ toYaml .Values.xxx.resources | nindent 12 }} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/template-chart/templates/xxx.ingress.yaml b/template-chart/templates/xxx.ingress.yaml index b4c33cc..d2227e8 100644 --- a/template-chart/templates/xxx.ingress.yaml +++ b/template-chart/templates/xxx.ingress.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -21,3 +22,4 @@ spec: - hosts: - {{ required "A Domain/Host must be provided" .Values.ingress.domain }} secretName: tls-{{ .Release.Name }}-{{ .Chart.Name }}-ingress +{{- end }} \ No newline at end of file diff --git a/template-chart/templates/xxx.pvc.yaml b/template-chart/templates/xxx.pvc.yaml new file mode 100644 index 0000000..f7f59d4 --- /dev/null +++ b/template-chart/templates/xxx.pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }}-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.storage.amount }} + {{- if .Values.storage.storageClass }} + storageClassName: {{ .Values.storage.storageClass }} + {{- end }} \ No newline at end of file diff --git a/template-chart/templates/xxx.secret.yaml b/template-chart/templates/xxx.secret.yaml new file mode 100644 index 0000000..14181c0 --- /dev/null +++ b/template-chart/templates/xxx.secret.yaml @@ -0,0 +1,6 @@ +apiVersion: onepassword.com/v1 +kind: OnePasswordItem +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }}-secret +spec: + itemPath: {{ required "You must provide a xxxSecret Reference" .Values.secrets.xxxSecretRef }} diff --git a/template-chart/values.yaml b/template-chart/values.yaml index 98ca668..cf0d8ae 100644 --- a/template-chart/values.yaml +++ b/template-chart/values.yaml @@ -1,3 +1,6 @@ +secrets: + xxxSecretRef: null + xxx: resources: requests: @@ -9,7 +12,11 @@ xxx: memory: 768Mi ephemeral-storage: 100Mi +storage: + amount: 10Gi + storageClass: null + ingress: enabled: true - clusterIssuer: letsencrypt + clusterIssuer: null domain: null \ No newline at end of file