From 1c64e5986edc888ffdb72c43b6d5b860fc701f20 Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Fri, 25 Oct 2024 17:16:44 -0700 Subject: [PATCH 1/2] kv-cp: add configMapName value to use your own configmap Signed-off-by: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> --- charts/kube-vip-cloud-provider/Chart.yaml | 2 +- charts/kube-vip-cloud-provider/templates/configmap.yaml | 2 +- charts/kube-vip-cloud-provider/templates/deployment.yaml | 2 +- charts/kube-vip-cloud-provider/values.yaml | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/kube-vip-cloud-provider/Chart.yaml b/charts/kube-vip-cloud-provider/Chart.yaml index e8318fc..f552eaa 100644 --- a/charts/kube-vip-cloud-provider/Chart.yaml +++ b/charts/kube-vip-cloud-provider/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.3 +version: 0.2.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/kube-vip-cloud-provider/templates/configmap.yaml b/charts/kube-vip-cloud-provider/templates/configmap.yaml index 78fe72f..33c0a46 100644 --- a/charts/kube-vip-cloud-provider/templates/configmap.yaml +++ b/charts/kube-vip-cloud-provider/templates/configmap.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "kube-vip-cloud-provider.name" . }}-cm + name: {{ include "kube-vip-cloud-provider.name" . }} namespace: {{ .Release.Namespace }} data: {{- range $key, $value := .Values.cm.data }} diff --git a/charts/kube-vip-cloud-provider/templates/deployment.yaml b/charts/kube-vip-cloud-provider/templates/deployment.yaml index b20b456..c70ccf3 100644 --- a/charts/kube-vip-cloud-provider/templates/deployment.yaml +++ b/charts/kube-vip-cloud-provider/templates/deployment.yaml @@ -23,7 +23,7 @@ spec: - name: KUBEVIP_NAMESPACE value: {{ .Release.Namespace }} - name: KUBEVIP_CONFIG_MAP - value: {{ include "kube-vip-cloud-provider.name" . }}-cm + value: {{ .Values.configMapName | default(include "kube-vip-cloud-provider.name" .) }} imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/charts/kube-vip-cloud-provider/values.yaml b/charts/kube-vip-cloud-provider/values.yaml index 13ac18b..c670986 100644 --- a/charts/kube-vip-cloud-provider/values.yaml +++ b/charts/kube-vip-cloud-provider/values.yaml @@ -24,6 +24,10 @@ image: cm: data: {} +# By default, kube-vip-cloud-provider will use a configMap automatically generated from .Values.cm.data. +# If .Values.configMapName is defined, it will use that configMap instead, which you must create yourself. +configMapName: "" + resources: requests: cpu: 50m From aaf397213ae194ac3ba567293fc536df8c2d09f3 Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:23:58 -0700 Subject: [PATCH 2/2] fix space Signed-off-by: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> --- charts/kube-vip-cloud-provider/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/kube-vip-cloud-provider/templates/deployment.yaml b/charts/kube-vip-cloud-provider/templates/deployment.yaml index c70ccf3..c7fcf45 100644 --- a/charts/kube-vip-cloud-provider/templates/deployment.yaml +++ b/charts/kube-vip-cloud-provider/templates/deployment.yaml @@ -23,7 +23,7 @@ spec: - name: KUBEVIP_NAMESPACE value: {{ .Release.Namespace }} - name: KUBEVIP_CONFIG_MAP - value: {{ .Values.configMapName | default(include "kube-vip-cloud-provider.name" .) }} + value: {{ .Values.configMapName | default (include "kube-vip-cloud-provider.name" .) }} imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.resources | nindent 12 }}