From 0bf98e0ba8e92623912972b4ce4992e6d0340f4d Mon Sep 17 00:00:00 2001 From: Prabhdeep Gill <39599471+PrabhdeepsGill@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:17:48 -0700 Subject: [PATCH 1/3] Allow spot network client to run in a separate ns. Spot network client can be created in a different namespace from "kube-system". --- charts/ocean-network-client/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/ocean-network-client/values.yaml b/charts/ocean-network-client/values.yaml index 5e7838a5..5bbf1aea 100644 --- a/charts/ocean-network-client/values.yaml +++ b/charts/ocean-network-client/values.yaml @@ -5,6 +5,8 @@ oceanController: secretName: spotinst-kubernetes-cluster-controller # -- (Optional) ConfigMap name. configMapName: spotinst-kubernetes-cluster-controller-config + # -- (Optional) Ocean Controller namespace + oceanControllerNamespace: kube-system image: # -- (Optional) Image repository. From 35ddd00d79dd55703a512df3d20b0ccc3e7e2bea Mon Sep 17 00:00:00 2001 From: Prabhdeep Gill <39599471+PrabhdeepsGill@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:20:47 -0700 Subject: [PATCH 2/3] Update daemon_set.yaml --- charts/ocean-network-client/templates/daemon_set.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/ocean-network-client/templates/daemon_set.yaml b/charts/ocean-network-client/templates/daemon_set.yaml index facf1cfb..db72026a 100644 --- a/charts/ocean-network-client/templates/daemon_set.yaml +++ b/charts/ocean-network-client/templates/daemon_set.yaml @@ -50,30 +50,35 @@ spec: valueFrom: secretKeyRef: name: {{ include "ocean-network-client.secretName" . }} + namespace: {{ include "ocean-network-client.oceanControllerNamespace" .}} key: token optional: true - name: SPOTINST_ACCOUNT valueFrom: secretKeyRef: name: {{ include "ocean-network-client.secretName" . }} + namespace: {{ include "ocean-network-client.oceanControllerNamespace" .}} key: account optional: true - name: SPOTINST_TOKEN_LEGACY valueFrom: configMapKeyRef: name: {{ include "ocean-network-client.configMapName" . }} + namespace: {{ include "ocean-network-client.oceanControllerNamespace" .}} key: spotinst.token optional: true - name: SPOTINST_ACCOUNT_LEGACY valueFrom: configMapKeyRef: name: {{ include "ocean-network-client.configMapName" . }} + namespace: {{ include "ocean-network-client.oceanControllerNamespace" .}} key: spotinst.account optional: true - name: CLUSTER_IDENTIFIER valueFrom: configMapKeyRef: name: {{ include "ocean-network-client.configMapName" . }} + namespace: {{ include "ocean-network-client.oceanControllerNamespace" .}} key: spotinst.cluster-identifier optional: true - name: MY_POD_IP From 6747e9314dbcd171f6db1ae98eb472a1cad3ab23 Mon Sep 17 00:00:00 2001 From: Prabhdeep Gill <39599471+PrabhdeepsGill@users.noreply.github.com> Date: Mon, 17 Apr 2023 16:03:40 -0700 Subject: [PATCH 3/3] Update _helpers.tpl --- charts/ocean-network-client/templates/_helpers.tpl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/ocean-network-client/templates/_helpers.tpl b/charts/ocean-network-client/templates/_helpers.tpl index e715f677..51b5b46c 100644 --- a/charts/ocean-network-client/templates/_helpers.tpl +++ b/charts/ocean-network-client/templates/_helpers.tpl @@ -26,6 +26,13 @@ Secret name. {{ default (include "ocean-network-client.name" .) .Values.oceanController.secretName }} {{- end }} +{{/* +Ocean Controller namespace. +*/}} +{{- define "ocean-network-client.oceanControllerNamespace" -}} +{{ default "kube-system" .Values.oceanController.oceanControllerNamespace }} +{{- end }} + {{/* DaemonSet labels. */}} @@ -38,4 +45,4 @@ NodeSelector labels. */}} {{- define "ocean-network-client.node-selector.labels" -}} kubernetes.io/os: linux -{{- end }} \ No newline at end of file +{{- end }}