From 8158a8038ea127c74a120a9c745951a2848de5b9 Mon Sep 17 00:00:00 2001 From: Ahmad Karimi <39967326+therealak12@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:34:57 +0330 Subject: [PATCH] use configmap instead of secret --- clients/harbor-client/charts/templates/configmap.yaml | 7 +++++++ clients/harbor-client/charts/templates/deployment.yaml | 4 ++-- clients/harbor-client/charts/templates/secret.yaml | 7 ------- clients/harbor-client/charts/values.yaml | 2 +- clients/proxy-client/charts/templates/configmap.yaml | 6 ++++++ clients/proxy-client/charts/templates/deployment.yaml | 4 ++-- clients/proxy-client/charts/templates/secret.yaml | 7 ------- clients/proxy-client/charts/values.yaml | 2 +- 8 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 clients/harbor-client/charts/templates/configmap.yaml delete mode 100644 clients/harbor-client/charts/templates/secret.yaml create mode 100644 clients/proxy-client/charts/templates/configmap.yaml delete mode 100644 clients/proxy-client/charts/templates/secret.yaml diff --git a/clients/harbor-client/charts/templates/configmap.yaml b/clients/harbor-client/charts/templates/configmap.yaml new file mode 100644 index 0000000..22d4244 --- /dev/null +++ b/clients/harbor-client/charts/templates/configmap.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.configMapName }} + namespace: {{ .Release.Namespace }} +data: + IMAGE_REFERENCE: "The image reference URL starts with //." diff --git a/clients/harbor-client/charts/templates/deployment.yaml b/clients/harbor-client/charts/templates/deployment.yaml index 1660ddf..a61fced 100644 --- a/clients/harbor-client/charts/templates/deployment.yaml +++ b/clients/harbor-client/charts/templates/deployment.yaml @@ -29,8 +29,8 @@ spec: env: - name: IMAGE_REFERENCE valueFrom: - secretKeyRef: - name: {{ .Values.configSecretName }} + configMapKeyRef: + name: {{ .Values.configMapName }} key: IMAGE_REFERENCE resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/clients/harbor-client/charts/templates/secret.yaml b/clients/harbor-client/charts/templates/secret.yaml deleted file mode 100644 index 1ad7107..0000000 --- a/clients/harbor-client/charts/templates/secret.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Values.configSecretName }} -type: Opaque -stringData: - IMAGE_REFERENCE: "The image reference URL starts with //." diff --git a/clients/harbor-client/charts/values.yaml b/clients/harbor-client/charts/values.yaml index 215eb6e..f2429e4 100644 --- a/clients/harbor-client/charts/values.yaml +++ b/clients/harbor-client/charts/values.yaml @@ -30,4 +30,4 @@ autoscaling: maxReplicas: 100 targetCPUUtilizationPercentage: 80 -configSecretName: spcld-harbor-health-client +configMapName: spcld-harbor-health-client diff --git a/clients/proxy-client/charts/templates/configmap.yaml b/clients/proxy-client/charts/templates/configmap.yaml new file mode 100644 index 0000000..54adfe6 --- /dev/null +++ b/clients/proxy-client/charts/templates/configmap.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.configMapName }} +data: + PROXY_URL: "The proxy address." diff --git a/clients/proxy-client/charts/templates/deployment.yaml b/clients/proxy-client/charts/templates/deployment.yaml index 5ff10e0..adc7be3 100644 --- a/clients/proxy-client/charts/templates/deployment.yaml +++ b/clients/proxy-client/charts/templates/deployment.yaml @@ -29,8 +29,8 @@ spec: env: - name: PROXY_URL valueFrom: - secretKeyRef: - name: {{ .Values.configSecretName }} + configMapKeyRef: + name: {{ .Values.configMapName }} key: PROXY_URL resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/clients/proxy-client/charts/templates/secret.yaml b/clients/proxy-client/charts/templates/secret.yaml deleted file mode 100644 index 223d19e..0000000 --- a/clients/proxy-client/charts/templates/secret.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Values.configSecretName }} -type: Opaque -stringData: - PROXY_URL: "The proxy address." diff --git a/clients/proxy-client/charts/values.yaml b/clients/proxy-client/charts/values.yaml index 9ccdd91..5571773 100644 --- a/clients/proxy-client/charts/values.yaml +++ b/clients/proxy-client/charts/values.yaml @@ -30,4 +30,4 @@ autoscaling: maxReplicas: 100 targetCPUUtilizationPercentage: 80 -configSecretName: spcld-proxy-health-client +configMapName: spcld-proxy-health-client