From 9b8c8ae33e3759f100e2070c930adfcce25b8d3f Mon Sep 17 00:00:00 2001 From: ckm007 Date: Mon, 1 Jun 2026 20:14:14 +0530 Subject: [PATCH 1/7] Closes #1827 config server helm chart updates --- .../templates/configmap-env-vars.yaml | 8 +- helm/config-server/templates/deployment.yaml | 223 ++++++++---------- helm/config-server/templates/secret.yaml | 6 +- 3 files changed, 110 insertions(+), 127 deletions(-) diff --git a/helm/config-server/templates/configmap-env-vars.yaml b/helm/config-server/templates/configmap-env-vars.yaml index eeb7097e582..92459e818c3 100644 --- a/helm/config-server/templates/configmap-env-vars.yaml +++ b/helm/config-server/templates/configmap-env-vars.yaml @@ -6,12 +6,18 @@ metadata: data: {{- if .Values.spring_profiles.enabled }} {{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_URI: "{{ $repo.uri }}" + SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_URI: {{ $repo.uri | quote }} + SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_TYPE: {{ $repo.type | quote }} + SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_DEFAULT_LABEL: {{ $repo.version | quote }} SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_SEARCHPATHS: {{ $repo.searchFolders | default "" | quote }} + SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_CLONE_ON_START: {{ $repo.spring_cloud_config_server_git_cloneOnStart | quote }} + SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_FORCE_PULL: {{ $repo.spring_cloud_config_server_git_force_pull | quote }} + SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_REFRESH_RATE: {{ $repo.spring_cloud_config_server_git_refreshRate | quote }} {{- if $repo.username }} SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_USERNAME: {{ $repo.username | quote }} {{- end }} {{- end }} + SPRING_CLOUD_CONFIG_SERVER_FAILONCOMPOSITEERROR: {{ .Values.spring_profiles.spring_fail_on_composite_error | quote }} {{- else if .Values.localRepo.enabled }} SPRING_CLOUD_CONFIG_SERVER_GIT_URI: {{ .Values.volume.mountDir | quote }} {{- end }} diff --git a/helm/config-server/templates/deployment.yaml b/helm/config-server/templates/deployment.yaml index 4128a9fe92f..b2abbd0696b 100644 --- a/helm/config-server/templates/deployment.yaml +++ b/helm/config-server/templates/deployment.yaml @@ -30,138 +30,115 @@ spec: securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }} {{- end }} containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.lifecycleHooks }} - lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }} - {{- end }} - env: - - name: JDK_JAVA_OPTIONS - value: {{ .Values.additionalResources.javaOpts }} - {{- if .Values.spring_profiles.enabled }} - {{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_URI - value: "{{ $repo.uri }}" - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_TYPE - value: "{{ $repo.type }}" - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_DEFAULT_LABEL - value: "{{ $repo.version }}" - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_CLONE_ON_START - value: "{{ $repo.spring_cloud_config_server_git_cloneOnStart }}" - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_FORCE_PULL - value: "{{ $repo.spring_cloud_config_server_git_force_pull }}" - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_REFRESH_RATE - value: "{{ $repo.spring_cloud_config_server_git_refreshRate }}" - {{- end }} - - name: SPRING_CLOUD_CONFIG_SERVER_FAILONCOMPOSITEERROR - value: "{{ .Values.spring_profiles.spring_fail_on_composite_error }}" - {{- end }} - {{- if .Values.localRepo.enabled }} - - name: spring_cloud_config_server_native_search-locations - value: {{ .Values.localRepo.spring_cloud_config_server_native_search_locations | quote }} - - name: spring_cloud_config_server_accept-empty - value: {{ .Values.localRepo.spring_cloud_config_server_accept_empty | quote }} - - name: spring_cloud_config_server_git_force-pull - value: {{ .Values.localRepo.spring_cloud_config_server_git_force_pull | quote }} - - name: spring_cloud_config_server_git_refreshRate - value: {{ .Values.localRepo.spring_cloud_config_server_git_refreshRate | quote }} - - name: spring_cloud_config_server_git_cloneOnStart - value: {{ .Values.localRepo.spring_cloud_config_server_git_cloneOnStart | quote }} - {{- end }} - {{- if .Values.spring_profiles.enabled }} - {{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} - {{- if $repo.token }} - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "config-server.fullname" $ }} - key: github-token-{{ $index }} - {{- end }} - {{- if $repo.username }} - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_USERNAME - value: {{ $repo.username | quote }} - {{- end }} - {{- end }} - {{- end }} - {{- range .Values.envVariables }} - {{- if .enabled }} - - name: {{ .name }} - valueFrom: - {{- if .valueFrom.configMapKeyRef }} - configMapKeyRef: - name: {{ .valueFrom.configMapKeyRef.name }} - key: {{ .valueFrom.configMapKeyRef.key }} - {{- else if .valueFrom.secretKeyRef }} - secretKeyRef: - name: {{ .valueFrom.secretKeyRef.name }} - key: {{ .valueFrom.secretKeyRef.key }} - {{- end }} - {{- end }} - {{- end }} - - {{- if .Values.extraEnvVars }} - {{- range .Values.extraEnvVars }} - {{- if .enabled }} - - name: {{ .name }} - {{- if .valueFrom }} - valueFrom: - {{- if .valueFrom.configMapKeyRef }} - configMapKeyRef: - name: {{ .valueFrom.configMapKeyRef.name }} - key: {{ .valueFrom.configMapKeyRef.key }} - {{- else if .valueFrom.secretKeyRef }} - secretKeyRef: - name: {{ .valueFrom.secretKeyRef.name }} - key: {{ .valueFrom.secretKeyRef.key }} - {{- end }} - {{- else }} - value: {{ .value | quote }} - {{- end }} - {{- end }} + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.lifecycleHooks }} + lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }} + {{- end }} + env: + - name: JDK_JAVA_OPTIONS + value: {{ .Values.additionalResources.javaOpts }} + {{- if .Values.localRepo.enabled }} + - name: spring_cloud_config_server_native_search-locations + value: {{ .Values.localRepo.spring_cloud_config_server_native_search_locations | quote }} + - name: spring_cloud_config_server_accept-empty + value: {{ .Values.localRepo.spring_cloud_config_server_accept_empty | quote }} + - name: spring_cloud_config_server_git_force-pull + value: {{ .Values.localRepo.spring_cloud_config_server_git_force_pull | quote }} + - name: spring_cloud_config_server_git_refreshRate + value: {{ .Values.localRepo.spring_cloud_config_server_git_refreshRate | quote }} + - name: spring_cloud_config_server_git_cloneOnStart + value: {{ .Values.localRepo.spring_cloud_config_server_git_cloneOnStart | quote }} + {{- end }} + {{- if .Values.spring_profiles.enabled }} + {{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} + {{- if $repo.token }} + - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "config-server.fullname" $ }} + key: github-token-{{ $index }} + {{- end }} + {{- end }} + {{- end }} + {{- range .Values.envVariables }} + {{- if .enabled }} + - name: {{ .name }} + valueFrom: + {{- if .valueFrom.configMapKeyRef }} + configMapKeyRef: + name: {{ .valueFrom.configMapKeyRef.name }} + key: {{ .valueFrom.configMapKeyRef.key }} + {{- else if .valueFrom.secretKeyRef }} + secretKeyRef: + name: {{ .valueFrom.secretKeyRef.name }} + key: {{ .valueFrom.secretKeyRef.key }} {{- end }} + {{- end }} + {{- end }} + {{- if .Values.extraEnvVars }} + {{- range .Values.extraEnvVars }} + {{- if .enabled }} + - name: {{ .name }} + {{- if .valueFrom }} + valueFrom: + {{- if .valueFrom.configMapKeyRef }} + configMapKeyRef: + name: {{ .valueFrom.configMapKeyRef.name }} + key: {{ .valueFrom.configMapKeyRef.key }} + {{- else if .valueFrom.secretKeyRef }} + secretKeyRef: + name: {{ .valueFrom.secretKeyRef.name }} + key: {{ .valueFrom.secretKeyRef.key }} {{- end }} - envFrom: - - configMapRef: - name: {{ printf "%s-env-vars" (include "config-server.fullname" .) }} - ports: - - name: http - containerPort: {{ .Values.springServicePort }} - protocol: TCP - {{- if .Values.startupProbe.enabled }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }} - {{- else if .Values.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.livenessProbe.enabled }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }} - {{- else if .Values.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }} + {{- else }} + value: {{ .value | quote }} {{- end }} - {{- if .Values.readinessProbe.enabled }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }} - {{- else if .Values.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.spring_profiles.enabled }} + {{- end }} + {{- end }} + {{- end }} + envFrom: + - configMapRef: + name: {{ printf "%s-env-vars" (include "config-server.fullname" .) }} + ports: + - name: http + containerPort: {{ .Values.springServicePort }} + protocol: TCP + {{- if .Values.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }} + {{- else if .Values.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }} + {{- else if .Values.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }} + {{- else if .Values.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} + {{- end }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if .Values.spring_profiles.enabled }} {{- if or .Values.localRepo.enabled (include "config-server.hasNative" . | eq "true") }} - volumeMounts: - - name: {{ .Values.volume.name }} - mountPath: {{ .Values.volume.mountDir }} + volumeMounts: + - name: {{ .Values.volume.name }} + mountPath: {{ .Values.volume.mountDir }} {{- end }} - {{- end }} - {{- if .Values.spring_profiles.enabled }} - {{- if or .Values.localRepo.enabled (include "config-server.hasNative" . | eq "true") }} + {{- end }} + {{- if .Values.spring_profiles.enabled }} + {{- if or .Values.localRepo.enabled (include "config-server.hasNative" . | eq "true") }} volumes: - name: {{ .Values.volume.name }} persistentVolumeClaim: claimName: {{ .Values.volume.name }} - {{- end }} - {{- end }} + {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/helm/config-server/templates/secret.yaml b/helm/config-server/templates/secret.yaml index dcf4f09f03a..d2dcf83578a 100644 --- a/helm/config-server/templates/secret.yaml +++ b/helm/config-server/templates/secret.yaml @@ -7,10 +7,10 @@ metadata: namespace: {{ .Release.Namespace }} type: Opaque data: + {{- if .Values.spring_profiles.enabled }} {{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} {{- if $repo.token }} - github-token-{{ $index }}: {{ $repo.token | quote }} - {{- else }} - github-token-{{ $index }}: "" + github-token-{{ $index }}: {{ $repo.token | b64enc | quote }} + {{- end }} {{- end }} {{- end }} From 6b6f89581b866e520dcc7c0149830fbc910ebac0 Mon Sep 17 00:00:00 2001 From: ckm007 Date: Wed, 3 Jun 2026 16:06:47 +0530 Subject: [PATCH 2/7] added secret to config server helm chart --- helm/config-server/templates/deployment.yaml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/helm/config-server/templates/deployment.yaml b/helm/config-server/templates/deployment.yaml index b2abbd0696b..403a3b74abf 100644 --- a/helm/config-server/templates/deployment.yaml +++ b/helm/config-server/templates/deployment.yaml @@ -53,17 +53,6 @@ spec: - name: spring_cloud_config_server_git_cloneOnStart value: {{ .Values.localRepo.spring_cloud_config_server_git_cloneOnStart | quote }} {{- end }} - {{- if .Values.spring_profiles.enabled }} - {{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} - {{- if $repo.token }} - - name: SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "config-server.fullname" $ }} - key: github-token-{{ $index }} - {{- end }} - {{- end }} - {{- end }} {{- range .Values.envVariables }} {{- if .enabled }} - name: {{ .name }} @@ -103,6 +92,11 @@ spec: envFrom: - configMapRef: name: {{ printf "%s-env-vars" (include "config-server.fullname" .) }} + {{- if .Values.spring_profiles.enabled }} + - secretRef: + name: {{ include "config-server.fullname" . }} + optional: true + {{- end }} ports: - name: http containerPort: {{ .Values.springServicePort }} From f617bf3d90a40737e2b04d80016518f2e6f829b4 Mon Sep 17 00:00:00 2001 From: abhishek-1809 Date: Thu, 4 Jun 2026 10:06:18 +0530 Subject: [PATCH 3/7] Closes #1828 Volume mounting is not working if git local repo is selcted Signed-off-by: abhishek-1809 --- helm/config-server/templates/config-pv.yaml | 6 ++---- helm/config-server/templates/config-pvc.yaml | 4 +--- helm/config-server/templates/deployment.yaml | 8 ++------ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/helm/config-server/templates/config-pv.yaml b/helm/config-server/templates/config-pv.yaml index d209ba3aa86..b8a35edb094 100644 --- a/helm/config-server/templates/config-pv.yaml +++ b/helm/config-server/templates/config-pv.yaml @@ -1,5 +1,4 @@ -{{- if .Values.spring_profiles.enabled }} - {{- if or .Values.localRepo.enabled (include "config-server.hasNative" . | eq "true") }} +{{- if .Values.localRepo.enabled }} apiVersion: v1 kind: PersistentVolume metadata: @@ -17,5 +16,4 @@ spec: nfs: server: {{ .Values.volume.nfs.server }} path: {{ .Values.volume.nfs.path }} - {{- end }} -{{- end }} \ No newline at end of file + {{- end }} \ No newline at end of file diff --git a/helm/config-server/templates/config-pvc.yaml b/helm/config-server/templates/config-pvc.yaml index b06ab486759..8266bbd943a 100644 --- a/helm/config-server/templates/config-pvc.yaml +++ b/helm/config-server/templates/config-pvc.yaml @@ -1,5 +1,4 @@ -{{- if .Values.spring_profiles.enabled }} - {{- if or .Values.localRepo.enabled (include "config-server.hasNative" . | eq "true") }} +{{- if .Values.localRepo.enabled }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -18,4 +17,3 @@ spec: matchLabels: name: {{ .Values.volume.name }} {{- end }} -{{- end }} diff --git a/helm/config-server/templates/deployment.yaml b/helm/config-server/templates/deployment.yaml index 403a3b74abf..dfe66322edc 100644 --- a/helm/config-server/templates/deployment.yaml +++ b/helm/config-server/templates/deployment.yaml @@ -118,21 +118,17 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.spring_profiles.enabled }} - {{- if or .Values.localRepo.enabled (include "config-server.hasNative" . | eq "true") }} + {{- if .Values.localRepo.enabled }} volumeMounts: - name: {{ .Values.volume.name }} mountPath: {{ .Values.volume.mountDir }} {{- end }} - {{- end }} - {{- if .Values.spring_profiles.enabled }} - {{- if or .Values.localRepo.enabled (include "config-server.hasNative" . | eq "true") }} + {{- if .Values.localRepo.enabled }} volumes: - name: {{ .Values.volume.name }} persistentVolumeClaim: claimName: {{ .Values.volume.name }} {{- end }} - {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} From 7d04693cf981dd09b221fe1b702d9169166f939e Mon Sep 17 00:00:00 2001 From: abhishek-1809 Date: Fri, 5 Jun 2026 18:37:00 +0530 Subject: [PATCH 4/7] Closes #1828 Volume mounting is not working if git local repo is selcted Signed-off-by: abhishek-1809 --- helm/config-server/templates/config-pv.yaml | 19 ------------------- helm/config-server/templates/config-pvc.yaml | 3 --- helm/config-server/templates/deployment.yaml | 10 ++++++++++ helm/config-server/values.yaml | 8 ++------ 4 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 helm/config-server/templates/config-pv.yaml diff --git a/helm/config-server/templates/config-pv.yaml b/helm/config-server/templates/config-pv.yaml deleted file mode 100644 index b8a35edb094..00000000000 --- a/helm/config-server/templates/config-pv.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.localRepo.enabled }} -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ .Values.volume.name }} - labels: - name: {{ .Values.volume.name }} -spec: - storageClassName: {{ .Values.volume.storageClass }} - capacity: - storage: {{ .Values.volume.size }} - accessModes: - {{- range .Values.volume.accessModes }} - - {{ . }} - {{- end }} - nfs: - server: {{ .Values.volume.nfs.server }} - path: {{ .Values.volume.nfs.path }} - {{- end }} \ No newline at end of file diff --git a/helm/config-server/templates/config-pvc.yaml b/helm/config-server/templates/config-pvc.yaml index 8266bbd943a..1441f9c08a2 100644 --- a/helm/config-server/templates/config-pvc.yaml +++ b/helm/config-server/templates/config-pvc.yaml @@ -13,7 +13,4 @@ spec: resources: requests: storage: {{ .Values.volume.size }} - selector: - matchLabels: - name: {{ .Values.volume.name }} {{- end }} diff --git a/helm/config-server/templates/deployment.yaml b/helm/config-server/templates/deployment.yaml index dfe66322edc..6a95967a3d0 100644 --- a/helm/config-server/templates/deployment.yaml +++ b/helm/config-server/templates/deployment.yaml @@ -41,6 +41,16 @@ spec: env: - name: JDK_JAVA_OPTIONS value: {{ .Values.additionalResources.javaOpts }} + {{- if and .Values.spring_profiles.enabled .Values.localRepo.enabled }} + - name: SPRING_PROFILES_ACTIVE + value: "{{ .Values.spring_profiles.spring_profiles_active }},{{ .Values.localRepo.spring_profiles_active }}" + {{- else if .Values.spring_profiles.enabled }} + - name: SPRING_PROFILES_ACTIVE + value: {{ .Values.spring_profiles.spring_profiles_active | quote }} + {{- else if .Values.localRepo.enabled }} + - name: SPRING_PROFILES_ACTIVE + value: {{ .Values.localRepo.spring_profiles_active | quote }} + {{- end }} {{- if .Values.localRepo.enabled }} - name: spring_cloud_config_server_native_search-locations value: {{ .Values.localRepo.spring_cloud_config_server_native_search_locations | quote }} diff --git a/helm/config-server/values.yaml b/helm/config-server/values.yaml index ee76404367f..6509de2b207 100644 --- a/helm/config-server/values.yaml +++ b/helm/config-server/values.yaml @@ -127,6 +127,7 @@ tolerations: [] affinity: {} spring_profiles: enabled: true + spring_profiles_active: "composite" spring_compositeRepos: # Based on the user requiremnt the number of multiple sources from where configuration needs to be pulled can be updated below as mentioned. - type: git @@ -164,18 +165,13 @@ volume: # existingClaim: your-claim ## ReadWriteMany not supported by AWS gp2 name: config-server - storageClass: nfs-client + storageClass: nfs-csi accessModes: - ReadWriteMany size: 10Mi existingClaim: # Dir where config and keys are written inside container mountDir: '/var/lib/config_repo' - nfs: - path: '' - # Dir within the nfs server where config repo is cloned/maintained locally. - server: '' - # Ip address of nfs server. ## Init containers parameters: ## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. ## From b834c5863eb9cdcec6b94705d388d6ea4cf175c7 Mon Sep 17 00:00:00 2001 From: abhishek-1809 Date: Fri, 5 Jun 2026 18:40:39 +0530 Subject: [PATCH 5/7] Closes #1828 Volume mounting is not working if git local repo is selcted Signed-off-by: abhishek-1809 --- deploy/config-server/install.sh | 9 --------- deploy/config-server/values.yaml | 6 ++---- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/deploy/config-server/install.sh b/deploy/config-server/install.sh index 5ef8a89f58e..a6de70ac645 100755 --- a/deploy/config-server/install.sh +++ b/deploy/config-server/install.sh @@ -18,15 +18,8 @@ fi if [ "$local_enabled" = "Y" ]; then LOCALREPO="true" - read -p "Provide the NFS path where the local repository is cloned/maintained: " path - NFS_PATH="$path" - - read -p "Provide the NFS IP address of the server where the local repository is cloned: " ip - NFS_SERVER="$ip" else LOCALREPO="false" - NFS_PATH="" - NFS_SERVER="" fi if [ $conf_installed = "Y" ]; then read -p "Is values.yaml for config-server chart set correctly as part of Pre-requisites?(Y/n) " yn; fi @@ -57,8 +50,6 @@ if [ $yn = "Y" ] echo "Installing config-server" helm -n $NS install config-server mosip/config-server \ --set localRepo.enabled="$LOCALREPO" \ - --set volume.nfs.path="$NFS_PATH" \ - --set volume.nfs.server="$NFS_SERVER" \ -f values.yaml \ --timeout 10m \ --wait --version $CHART_VERSION diff --git a/deploy/config-server/values.yaml b/deploy/config-server/values.yaml index 6b2b9772700..4d9ab9bee74 100644 --- a/deploy/config-server/values.yaml +++ b/deploy/config-server/values.yaml @@ -1,5 +1,6 @@ spring_profiles: enabled: true + spring_profiles_active: "composite" spring_compositeRepos: # Based on the user requiremnt the number of multiple sources from where configuration needs to be pulled can be updated below as mentioned. - type: git @@ -39,16 +40,13 @@ volume: # existingClaim: your-claim ## ReadWriteMany not supported by AWS gp2 name: config-server - storageClass: nfs-client + storageClass: nfs-csi accessModes: - ReadWriteMany size: 10Mi existingClaim: # Dir where config and keys are written inside container mountDir: '/var/lib/config_repo' - nfs: - path: '' # Dir within the nfs server where config repo is cloned/maintained locally. - server: '' # Ip address of nfs server. ## Extra environment variables to be passed to the config-server container ## By default, these are enabled for development/testing. Set enabled: false in production if not needed. From b18243aa42ae72978aa7f676f65750540964e9fa Mon Sep 17 00:00:00 2001 From: abhishek-1809 Date: Mon, 8 Jun 2026 11:49:15 +0530 Subject: [PATCH 6/7] Closes #1828 Volume mounting is not working if git local repo is selcted Signed-off-by: abhishek-1809 --- deploy/config-server/install.sh | 36 +++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/deploy/config-server/install.sh b/deploy/config-server/install.sh index a6de70ac645..3e23229651e 100755 --- a/deploy/config-server/install.sh +++ b/deploy/config-server/install.sh @@ -11,17 +11,36 @@ CHART_VERSION=1.3.1-develop read -p "Is conf-secrets module installed?(Y/n) " conf_installed -read -p "Do you want to enable config-server to pull configurations from local repository?(Y/n)( Default: n )" local_enabled -if [[ -z $local_enabled ]]; then - local_enabled=n -fi +echo "Please select the configuration source for config-server:" +echo "1. Pull configurations from multiple remote repositories (Git)" +echo "2. Pull configurations from local repository (NFS)" +echo "3. Both (Remote Git and Local NFS)" +read -p "Enter your choice (1/2/3) [Default: 1]: " repo_choice -if [ "$local_enabled" = "Y" ]; then - LOCALREPO="true" -else - LOCALREPO="false" +if [[ -z $repo_choice ]]; then + repo_choice=1 fi +case $repo_choice in + 1) + SPRING_PROFILES="true" + LOCALREPO="false" + ;; + 2) + SPRING_PROFILES="false" + LOCALREPO="true" + ;; + 3) + SPRING_PROFILES="true" + LOCALREPO="true" + ;; + *) + echo "Invalid choice. Defaulting to option 1." + SPRING_PROFILES="true" + LOCALREPO="false" + ;; +esac + if [ $conf_installed = "Y" ]; then read -p "Is values.yaml for config-server chart set correctly as part of Pre-requisites?(Y/n) " yn; fi if [ $yn = "Y" ] then @@ -49,6 +68,7 @@ if [ $yn = "Y" ] echo "Installing config-server" helm -n $NS install config-server mosip/config-server \ + --set spring_profiles.enabled="$SPRING_PROFILES" \ --set localRepo.enabled="$LOCALREPO" \ -f values.yaml \ --timeout 10m \ From 5c7dab3403f3b01c486df1d7e10925d0479620b0 Mon Sep 17 00:00:00 2001 From: abhishek-1809 Date: Tue, 9 Jun 2026 18:12:59 +0530 Subject: [PATCH 7/7] Closes #1828 Volume mounting is not working if git local repo is selcted Signed-off-by: abhishek-1809 --- helm/config-server/templates/secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/config-server/templates/secret.yaml b/helm/config-server/templates/secret.yaml index d2dcf83578a..31def49fed3 100644 --- a/helm/config-server/templates/secret.yaml +++ b/helm/config-server/templates/secret.yaml @@ -10,7 +10,7 @@ data: {{- if .Values.spring_profiles.enabled }} {{- range $index, $repo := .Values.spring_profiles.spring_compositeRepos }} {{- if $repo.token }} - github-token-{{ $index }}: {{ $repo.token | b64enc | quote }} + SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_{{ $index }}_PASSWORD: {{ $repo.token | b64enc | quote }} {{- end }} {{- end }} {{- end }}