From a21d53bbacd0753c2651a62d65a449954fd55dc7 Mon Sep 17 00:00:00 2001 From: babykart Date: Thu, 14 May 2026 17:30:07 +0200 Subject: [PATCH 1/5] fix(chart): remove token and add automountServiceAccountToken Signed-off-by: babykart --- charts/garnet/templates/serviceaccount.yaml | 5 +---- charts/garnet/templates/token.yaml | 14 -------------- charts/garnet/values.yaml | 4 ++-- 3 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 charts/garnet/templates/token.yaml diff --git a/charts/garnet/templates/serviceaccount.yaml b/charts/garnet/templates/serviceaccount.yaml index fe1be67b148..c62b02f4bee 100644 --- a/charts/garnet/templates/serviceaccount.yaml +++ b/charts/garnet/templates/serviceaccount.yaml @@ -9,8 +9,5 @@ metadata: annotations: {{- toYaml . | nindent 4 }} {{- end }} -{{- if and .Values.serviceAccount.token (semverCompare ">=1.24-0" .Capabilities.KubeVersion.GitVersion) }} -secrets: -- name: {{ include "garnet.serviceAccountName" . }}-token -{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount | default false }} {{- end }} diff --git a/charts/garnet/templates/token.yaml b/charts/garnet/templates/token.yaml deleted file mode 100644 index c4e959b129e..00000000000 --- a/charts/garnet/templates/token.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.serviceAccount.token (semverCompare ">=1.24-0" .Capabilities.KubeVersion.GitVersion) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "garnet.serviceAccountName" . }}-token - labels: - {{- include "garnet.labels" . | nindent 4 }} - annotations: - kubernetes.io/service-account.name: {{ include "garnet.serviceAccountName" . }} - {{- with .Values.serviceAccount.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -type: kubernetes.io/service-account-token -{{- end }} diff --git a/charts/garnet/values.yaml b/charts/garnet/values.yaml index 7d7af782137..f767b0f5e14 100644 --- a/charts/garnet/values.yaml +++ b/charts/garnet/values.yaml @@ -36,8 +36,8 @@ serviceAccount: # -- The name of the service account to use. # If not set and create is true, a name is generated using the fullname template name: "" - # -- Creates the token object - token: false + # -- Automatically mount the service account token + automount: false config: # -- Garnet secret (if you want to use an existing secret). From 3f1bca1005b257b3a9bc5bb59c864ce9fc4f8460 Mon Sep 17 00:00:00 2001 From: babykart Date: Thu, 14 May 2026 17:48:10 +0200 Subject: [PATCH 2/5] feat(chart): add keys to parametrize IPv4/IPv6 behavior Signed-off-by: babykart --- charts/garnet/templates/service.yaml | 5 +++++ charts/garnet/values.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/charts/garnet/templates/service.yaml b/charts/garnet/templates/service.yaml index 8248e720f55..cfe34856669 100644 --- a/charts/garnet/templates/service.yaml +++ b/charts/garnet/templates/service.yaml @@ -10,6 +10,11 @@ metadata: {{- end }} spec: type: {{ .Values.service.type }} + ipFamilies: + {{- with .Values.service.ipFamilies }} + {{- toYaml . | nindent 4 }} + {{- end }} + ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} ports: - port: {{ .Values.service.port }} targetPort: {{ .Values.containers.port }} diff --git a/charts/garnet/values.yaml b/charts/garnet/values.yaml index f767b0f5e14..f04d0d36934 100644 --- a/charts/garnet/values.yaml +++ b/charts/garnet/values.yaml @@ -113,6 +113,11 @@ service: type: ClusterIP # -- Service port port: 6379 + # -- Service ipFamilies + ipFamilies: + - IPv4 + # -- Service ipFamilyPolicy SingleStack|PreferDualStack|RequireDualStack + ipFamilyPolicy: SingleStack # -- Resources resources: {} From e5923d43ce1bfbc1d22c1ca48e7d46f0a33dfc4a Mon Sep 17 00:00:00 2001 From: babykart Date: Thu, 14 May 2026 17:51:54 +0200 Subject: [PATCH 3/5] style(chart): move livenessProbe & readinessProbe keys Signed-off-by: babykart --- charts/garnet/templates/statefulset.yaml | 4 ++-- charts/garnet/values.yaml | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/charts/garnet/templates/statefulset.yaml b/charts/garnet/templates/statefulset.yaml index 0d1a1b4d18d..4a1321d312a 100644 --- a/charts/garnet/templates/statefulset.yaml +++ b/charts/garnet/templates/statefulset.yaml @@ -55,11 +55,11 @@ spec: - name: garnet containerPort: {{ .Values.containers.port }} protocol: TCP - {{- with .Values.containers.livenessProbe }} + {{- with .Values.livenessProbe }} livenessProbe: {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.containers.readinessProbe }} + {{- with .Values.readinessProbe }} readinessProbe: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/charts/garnet/values.yaml b/charts/garnet/values.yaml index f04d0d36934..84ce72e92f4 100644 --- a/charts/garnet/values.yaml +++ b/charts/garnet/values.yaml @@ -58,10 +58,12 @@ containers: args: [] # -- Containers port port: 6379 - # -- Containers livenessProbe - livenessProbe: {} - # -- Containers livenessProbe - readinessProbe: {} + +# -- Containers livenessProbe +livenessProbe: {} + +# -- Containers livenessProbe +readinessProbe: {} # -- Init containers initContainers: [] From e6d19b3be20b326ca406d480c77779ba740b26cc Mon Sep 17 00:00:00 2001 From: babykart Date: Thu, 14 May 2026 17:54:18 +0200 Subject: [PATCH 4/5] feat(chart): add values.schema.json Signed-off-by: babykart --- charts/garnet/values.schema.json | 222 +++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 charts/garnet/values.schema.json diff --git a/charts/garnet/values.schema.json b/charts/garnet/values.schema.json new file mode 100644 index 00000000000..51c82dd52c4 --- /dev/null +++ b/charts/garnet/values.schema.json @@ -0,0 +1,222 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "affinity": { + "description": "Affinity", + "type": "object" + }, + "config": { + "type": "object", + "properties": { + "existingSecret": { + "description": "Garnet secret (if you want to use an existing secret). This secret must contains a key called 'garnet.conf'.", + "type": "string" + }, + "garnetConf": { + "description": "The garnet.conf data content.", + "type": "string" + } + } + }, + "containers": { + "type": "object", + "properties": { + "args": { + "description": "Containers args", + "type": "array" + }, + "port": { + "description": "Containers port", + "type": "integer" + } + } + }, + "dnsConfig": { + "description": "DNS config", + "type": "object" + }, + "dnsPolicy": { + "description": "DNS policy", + "type": "string" + }, + "extraVolumeMounts": { + "description": "Extra Volume Mounts", + "type": "array" + }, + "extraVolumes": { + "description": "Extra Volumes", + "type": "array" + }, + "fullnameOverride": { + "description": "Chart full name override", + "type": "string" + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "description": "Image pull policy", + "type": "string" + }, + "registry": { + "description": "Image registry", + "type": "string" + }, + "repository": { + "description": "Image repository", + "type": "string" + }, + "tag": { + "description": "Overrides the image tag whose default is the chart appVersion.", + "type": "string" + } + } + }, + "imagePullSecrets": { + "description": "Image pull secrets", + "type": "array" + }, + "initContainers": { + "description": "Init containers", + "type": "array" + }, + "livenessProbe": { + "description": "Containers livenessProbe", + "type": "object" + }, + "nameOverride": { + "description": "Chart name override", + "type": "string" + }, + "nodeSelector": { + "description": "Node Selector labels", + "type": "object" + }, + "persistence": { + "type": "object", + "properties": { + "enabled": { + "description": "persistence enabled", + "type": "boolean" + }, + "storageDir": { + "description": "The Storage directory for tiered records (hybrid log), if storage tiering (--storage-tier) is enabled. Default: \"/data\"", + "type": "string" + } + } + }, + "podAnnotations": { + "description": "Pod annotations", + "type": "object" + }, + "podSecurityContext": { + "description": "Pod Security Context", + "type": "object" + }, + "readinessProbe": { + "description": "Containers livenessProbe", + "type": "object" + }, + "resources": { + "description": "Resources", + "type": "object" + }, + "securityContext": { + "description": "Security Context", + "type": "object" + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "description": "Service annotations", + "type": "object" + }, + "ipFamilies": { + "description": "Service ipFamilies", + "type": "array", + "items": { + "type": "string" + } + }, + "ipFamilyPolicy": { + "description": "Service ipFamilyPolicy SingleStack|PreferDualStack|RequireDualStack", + "type": "string" + }, + "port": { + "description": "Service port", + "type": "integer" + }, + "type": { + "description": "Service type", + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations to add to the service account", + "type": "object" + }, + "automount": { + "description": "Automatically mount the service account token", + "type": "boolean" + }, + "create": { + "description": "Specifies whether a service account should be created", + "type": "boolean" + }, + "name": { + "description": "The name of the service account to use. If not set and create is true, a name is generated using the fullname template", + "type": "string" + } + } + }, + "statefulSet": { + "type": "object", + "properties": { + "annotations": { + "description": "StatefulSet annotations", + "type": "object" + }, + "replicas": { + "description": "StatefulSet replicas", + "type": "integer" + }, + "revisionHistoryLimit": { + "description": "StatefulSet revisionHistoryLimit", + "type": "integer" + }, + "updateStrategy": { + "type": "object", + "properties": { + "type": { + "description": "StatefulSet updateStrategy type", + "type": "string" + } + } + } + } + }, + "tolerations": { + "description": "Tolerations", + "type": "array" + }, + "volumeClaimTemplates": { + "type": "object", + "properties": { + "requestsStorage": { + "description": "Volume Claim Templates Requests Storage", + "type": "string" + }, + "storageClassName": { + "description": "Volume Claim Templates Storage Class Name", + "type": "string" + } + } + } + } +} From 6363cd2840e2a0691f4a139f99a53462dc0a4451 Mon Sep 17 00:00:00 2001 From: babykart Date: Thu, 14 May 2026 18:10:51 +0200 Subject: [PATCH 5/5] fix(chart): add missing ipFamily keys to service-headless Signed-off-by: babykart --- charts/garnet/templates/service-headless.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/garnet/templates/service-headless.yaml b/charts/garnet/templates/service-headless.yaml index 71c389951d5..55e59f9b630 100644 --- a/charts/garnet/templates/service-headless.yaml +++ b/charts/garnet/templates/service-headless.yaml @@ -10,6 +10,11 @@ metadata: {{- end }} spec: clusterIP: None + ipFamilies: + {{- with .Values.service.ipFamilies }} + {{- toYaml . | nindent 4 }} + {{- end }} + ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} ports: - port: {{ .Values.service.port }} targetPort: {{ .Values.containers.port }}