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 }} 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 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.