From 226b269482171a8761b960ebd7ed6480949e6104 Mon Sep 17 00:00:00 2001 From: Max Herbert Date: Mon, 18 Nov 2024 10:56:58 +0000 Subject: [PATCH 1/6] Initial changes --- Charts/ioc-instance/templates/deployment.yaml | 4 ++++ Charts/ioc-instance/values.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Charts/ioc-instance/templates/deployment.yaml b/Charts/ioc-instance/templates/deployment.yaml index ddc56a3..728685d 100644 --- a/Charts/ioc-instance/templates/deployment.yaml +++ b/Charts/ioc-instance/templates/deployment.yaml @@ -39,6 +39,10 @@ spec: # always re-deploy in case the configMap has changed rollme: {{ randAlphaNum 5 | quote }} spec: + {{- if .Values.podSpec }} +{{ toYaml .Values.podSpec | indent 6}} + {{- end }} + {{- if .Values.serviceAccountName }} serviceAccountName: {{ .Values.serviceAccountName | quote }} {{- end }} diff --git a/Charts/ioc-instance/values.yaml b/Charts/ioc-instance/values.yaml index 5286229..d4c7f48 100644 --- a/Charts/ioc-instance/values.yaml +++ b/Charts/ioc-instance/values.yaml @@ -23,6 +23,10 @@ location: "" # DEFAULT = .Values.$location ioc_group: "" +# TODO: Description +podSpec: {} + + # we use the default service account in the namespace so leave this out # if you need to specify an alternative then uncomment below serviceAccountName: "" From abd4d3189fc805f0dad3dc37e6578a6b4f27698d Mon Sep 17 00:00:00 2001 From: Max Herbert Date: Mon, 18 Nov 2024 11:34:05 +0000 Subject: [PATCH 2/6] Added description placeholder --- Schemas/ioc-instance.schema.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Schemas/ioc-instance.schema.json b/Schemas/ioc-instance.schema.json index 7d13173..2a595b4 100644 --- a/Schemas/ioc-instance.schema.json +++ b/Schemas/ioc-instance.schema.json @@ -111,6 +111,10 @@ "resources": { "$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/resources" }, + "podSpec": { + "type": "object", + "description": "TODO: Write description" + }, "nodeName": { "$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/nodeName" }, From 87f9f327b03f9ee8e5c846f9883e04c19b789e73 Mon Sep 17 00:00:00 2001 From: Max Herbert Date: Wed, 20 Nov 2024 10:12:59 +0000 Subject: [PATCH 3/6] Improved scheme description --- Charts/ioc-instance/values.yaml | 2 +- Schemas/ioc-instance.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Charts/ioc-instance/values.yaml b/Charts/ioc-instance/values.yaml index d4c7f48..3c94a9d 100644 --- a/Charts/ioc-instance/values.yaml +++ b/Charts/ioc-instance/values.yaml @@ -23,7 +23,7 @@ location: "" # DEFAULT = .Values.$location ioc_group: "" -# TODO: Description +# Features relating to the pod run time, such as USB devices podSpec: {} diff --git a/Schemas/ioc-instance.schema.json b/Schemas/ioc-instance.schema.json index 2a595b4..80f4ad3 100644 --- a/Schemas/ioc-instance.schema.json +++ b/Schemas/ioc-instance.schema.json @@ -113,7 +113,7 @@ }, "podSpec": { "type": "object", - "description": "TODO: Write description" + "description": "Features relating to the pod run time, such as USB devices" }, "nodeName": { "$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/nodeName" From 3cd054592b198dc32251ee4c392041544675a1e2 Mon Sep 17 00:00:00 2001 From: Max Herbert Date: Thu, 21 Nov 2024 09:37:03 +0000 Subject: [PATCH 4/6] Removed full customisation --- Charts/ioc-instance/templates/deployment.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Charts/ioc-instance/templates/deployment.yaml b/Charts/ioc-instance/templates/deployment.yaml index 728685d..64a58e1 100644 --- a/Charts/ioc-instance/templates/deployment.yaml +++ b/Charts/ioc-instance/templates/deployment.yaml @@ -39,10 +39,9 @@ spec: # always re-deploy in case the configMap has changed rollme: {{ randAlphaNum 5 | quote }} spec: - {{- if .Values.podSpec }} -{{ toYaml .Values.podSpec | indent 6}} + {{- if .Values.runtimeClassName }} + runtimeClassName: {{ .Values.runtimeClassName }} {{- end }} - {{- if .Values.serviceAccountName }} serviceAccountName: {{ .Values.serviceAccountName | quote }} {{- end }} From b56954eba9cb84203d623f9d15a8b8d3b30e2b8e Mon Sep 17 00:00:00 2001 From: Max Herbert Date: Thu, 21 Nov 2024 15:31:01 +0000 Subject: [PATCH 5/6] Updated schema --- Charts/ioc-instance/values.yaml | 2 +- Schemas/ioc-instance.schema.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Charts/ioc-instance/values.yaml b/Charts/ioc-instance/values.yaml index 3c94a9d..318a757 100644 --- a/Charts/ioc-instance/values.yaml +++ b/Charts/ioc-instance/values.yaml @@ -24,7 +24,7 @@ location: "" ioc_group: "" # Features relating to the pod run time, such as USB devices -podSpec: {} +runtimeClassName: {} # we use the default service account in the namespace so leave this out diff --git a/Schemas/ioc-instance.schema.json b/Schemas/ioc-instance.schema.json index 80f4ad3..ccb0b07 100644 --- a/Schemas/ioc-instance.schema.json +++ b/Schemas/ioc-instance.schema.json @@ -111,9 +111,9 @@ "resources": { "$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/resources" }, - "podSpec": { + "runtimeClassName": { "type": "object", - "description": "Features relating to the pod run time, such as USB devices" + "description":"RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md" }, "nodeName": { "$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/nodeName" From cc7433546c6cfb0b7050378a007cd35bd373ac2f Mon Sep 17 00:00:00 2001 From: Max Herbert Date: Thu, 21 Nov 2024 15:49:31 +0000 Subject: [PATCH 6/6] Corrected schema reference --- Charts/ioc-instance/values.yaml | 2 +- Schemas/ioc-instance.schema.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Charts/ioc-instance/values.yaml b/Charts/ioc-instance/values.yaml index 318a757..b6b9ea7 100644 --- a/Charts/ioc-instance/values.yaml +++ b/Charts/ioc-instance/values.yaml @@ -24,7 +24,7 @@ location: "" ioc_group: "" # Features relating to the pod run time, such as USB devices -runtimeClassName: {} +runtimeClassName: "" # we use the default service account in the namespace so leave this out diff --git a/Schemas/ioc-instance.schema.json b/Schemas/ioc-instance.schema.json index ccb0b07..ab84fe5 100644 --- a/Schemas/ioc-instance.schema.json +++ b/Schemas/ioc-instance.schema.json @@ -112,8 +112,7 @@ "$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/resources" }, "runtimeClassName": { - "type": "object", - "description":"RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md" + "$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/runtimeClassName" }, "nodeName": { "$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/nodeName"