From 7b9536c407a49e689a38c8ceb5bcc7c89f10a8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfredo=20Espa=C3=B1a?= Date: Thu, 7 Jul 2022 12:08:47 -0600 Subject: [PATCH] Adding nodeSector (#28) --- README.md | 8 +++++--- templates/deployment-api.yaml | 4 ++++ templates/deployment-executor.yaml | 4 ++++ templates/deployment-registry.yaml | 4 ++++ templates/deployment-ui.yaml | 4 ++++ values.schema.json | 12 ++++++++++++ 6 files changed, 33 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a4da59f..8331d6a 100644 --- a/README.md +++ b/README.md @@ -607,7 +607,7 @@ ingress: kubernetes.io/ingress.class: alb ``` -### 4.1 Node Affinity, Taints and Tolerations. +### 4.1 Node Affinity, NodeSelector, Taints and Tolerations. The API, Registry, Executor and UI support using affinity, taints and tolerations. Use the following examples as reference: @@ -626,12 +626,14 @@ api: requests: cpu: 200m memory: 256Mi - tolerations: + tolerations: # OPTIONAL - key: "key1" operator: "Equal" value: "value1" effect: "NoSchedule" - affinity: + nodeSelector: # OPTIONAL + disktype: ssd + affinity: # OPTIONAL nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: diff --git a/templates/deployment-api.yaml b/templates/deployment-api.yaml index dc554cb..18cf212 100644 --- a/templates/deployment-api.yaml +++ b/templates/deployment-api.yaml @@ -52,4 +52,8 @@ spec: tolerations: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .Values.api.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} {{ end }} \ No newline at end of file diff --git a/templates/deployment-executor.yaml b/templates/deployment-executor.yaml index 919eb89..26bd071 100644 --- a/templates/deployment-executor.yaml +++ b/templates/deployment-executor.yaml @@ -52,4 +52,8 @@ spec: tolerations: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .Values.executor.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} {{ end }} \ No newline at end of file diff --git a/templates/deployment-registry.yaml b/templates/deployment-registry.yaml index db287ae..3af096b 100644 --- a/templates/deployment-registry.yaml +++ b/templates/deployment-registry.yaml @@ -52,4 +52,8 @@ spec: tolerations: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .Values.registry.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} {{ end }} \ No newline at end of file diff --git a/templates/deployment-ui.yaml b/templates/deployment-ui.yaml index 4b66ea3..e84cd8a 100644 --- a/templates/deployment-ui.yaml +++ b/templates/deployment-ui.yaml @@ -34,4 +34,8 @@ spec: tolerations: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .Values.ui.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} {{ end }} \ No newline at end of file diff --git a/values.schema.json b/values.schema.json index 36de1d8..64ac088 100644 --- a/values.schema.json +++ b/values.schema.json @@ -126,6 +126,9 @@ "affinity": { "type": "object" }, + "nodeSelector": { + "type": "object" + }, "tolerations": { "type": "array", "items": { @@ -186,6 +189,9 @@ "affinity": { "type": "object" }, + "nodeSelector": { + "type": "object" + }, "tolerations": { "type": "array", "items": { @@ -242,6 +248,9 @@ "affinity": { "type": "object" }, + "nodeSelector": { + "type": "object" + }, "tolerations": { "type": "array", "items": { @@ -276,6 +285,9 @@ "affinity": { "type": "object" }, + "nodeSelector": { + "type": "object" + }, "tolerations": { "type": "array", "items": {