From f937d018ba549a881c287918c36d980283b5f22a Mon Sep 17 00:00:00 2001 From: Michel TURPIN Date: Tue, 31 Dec 2024 11:02:53 +0100 Subject: [PATCH] feat(openfga): Allow extra labels specific to pods These labels can be used by LabelSelectors (ie: network policies, webhooks) --- charts/openfga/templates/deployment.yaml | 3 +++ charts/openfga/values.schema.json | 8 ++++++++ charts/openfga/values.yaml | 1 + 3 files changed, 12 insertions(+) diff --git a/charts/openfga/templates/deployment.yaml b/charts/openfga/templates/deployment.yaml index cd276e0..3c247ae 100644 --- a/charts/openfga/templates/deployment.yaml +++ b/charts/openfga/templates/deployment.yaml @@ -29,6 +29,9 @@ spec: {{- with .Values.commonLabels }} {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.podExtraLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/openfga/values.schema.json b/charts/openfga/values.schema.json index 9ec52d9..c6b2b44 100644 --- a/charts/openfga/values.schema.json +++ b/charts/openfga/values.schema.json @@ -783,6 +783,14 @@ }, "default": {} }, + "podExtraLabels": { + "type": "object", + "description": "Map of labels to add to the pods' manifest", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, "service": { "type": "object", "properties": { diff --git a/charts/openfga/values.yaml b/charts/openfga/values.yaml index 16da369..206ad15 100644 --- a/charts/openfga/values.yaml +++ b/charts/openfga/values.yaml @@ -28,6 +28,7 @@ serviceAccount: annotations: {} podAnnotations: {} +podExtraLabels: {} extraEnvVars: [] extraVolumes: []