From 271f44e16e7cd7eb9445763d00c77dddbb1fdda0 Mon Sep 17 00:00:00 2001 From: Julian Perge Date: Mon, 7 Oct 2024 19:03:22 -0400 Subject: [PATCH] Fixing manager.env schema and added manager.envFrom --- charts/k6-operator/templates/deployment.yaml | 8 +++++++- charts/k6-operator/values.schema.json | 14 ++++++++++---- charts/k6-operator/values.yaml | 14 +++++++++++--- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/charts/k6-operator/templates/deployment.yaml b/charts/k6-operator/templates/deployment.yaml index 49c64091..d11d3bce 100644 --- a/charts/k6-operator/templates/deployment.yaml +++ b/charts/k6-operator/templates/deployment.yaml @@ -43,7 +43,13 @@ spec: {{- if .Values.manager.env }} env: {{- with .Values.manager.env }} - {{- toYaml . | nindent 10 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} + {{- if .Values.manager.envFrom }} + envFrom: + {{- with .Values.manager.envFrom }} + {{- toYaml . | nindent 12 }} {{- end }} {{- end }} {{- if .Values.manager.containerSecurityContext }} diff --git a/charts/k6-operator/values.schema.json b/charts/k6-operator/values.schema.json index 58e66b42..d4c11eb4 100644 --- a/charts/k6-operator/values.schema.json +++ b/charts/k6-operator/values.schema.json @@ -142,10 +142,16 @@ "type": "object" }, "env": { - "additionalProperties": false, - "description": "manager.env -- Environment variables to be applied on the controller", + "items": {}, + "description": "manager.env -- List of environment variables to set in the controller", "title": "env", - "type": "object" + "type": "array" + }, + "envFrom": { + "items": {}, + "description": "manager.envFrom -- List of sources to populate environment variables in the controller", + "title": "envFrom", + "type": "array" }, "image": { "additionalProperties": false, @@ -169,7 +175,7 @@ "type": "string" }, "tag": { - "default": "controller-v0.0.15", + "default": "controller-v0.0.17", "description": "manager.image.tag -- controller-manager image tag", "title": "tag", "type": "string" diff --git a/charts/k6-operator/values.yaml b/charts/k6-operator/values.yaml index 9c8e84e0..27ef2ae1 100644 --- a/charts/k6-operator/values.yaml +++ b/charts/k6-operator/values.yaml @@ -149,10 +149,18 @@ manager: # @schema # required: false - # type: object + # type: array + # @schema + # manager.env -- List of environment variables to set in the controller + env: [] + # @schema - # manager.env -- Environment variables to be applied on the controller - env: {} + # required: false + # type: array + # @schema + # manager.envFrom -- List of sources to populate environment variables in the controller + envFrom: [] + # manager.resources -- controller-manager Resources definition resources: limits: