From 95b04acde040240f24d8d04328f20584767e3969 Mon Sep 17 00:00:00 2001 From: Rami Mohamed Date: Sun, 2 Aug 2026 13:03:07 +0400 Subject: [PATCH 1/2] feat: add config-server local SIT Helm values --- .github/workflows/ci.yml | 4 +++- AGENTS.md | 2 +- README.md | 9 ++++++--- helm/templates/deployment.yaml | 8 ++++---- helm/values-sit.yaml | 5 +++++ helm/values.yaml | 6 +++--- 6 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 helm/values-sit.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8d0969..eb2a7de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,11 +48,13 @@ jobs: version: v4.2.0 - name: Lint chart - run: helm lint helm --strict + run: helm lint helm --strict --values helm/values-sit.yaml - name: Render chart run: | helm template config-server helm \ + --namespace digital-bank-sit \ + --values helm/values-sit.yaml \ --set image.tag="${GITHUB_SHA}" \ > rendered.yaml test -s rendered.yaml diff --git a/AGENTS.md b/AGENTS.md index debe212..0e5bf9b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,7 +27,7 @@ It serves externalized runtime configuration from `config-repo` to the platform ./mvnw test ./mvnw verify ./mvnw spring-boot:run -helm lint helm --strict +helm lint helm --strict --values helm/values-sit.yaml ``` ## Runtime Notes diff --git a/README.md b/README.md index 1282f32..c0634b7 100644 --- a/README.md +++ b/README.md @@ -188,13 +188,15 @@ kubectl get nodes Validate the chart without changing the cluster: ```bash -helm lint helm +helm lint helm --strict --values helm/values-sit.yaml -helm template config-server helm | +helm template config-server helm \ + --namespace digital-bank-sit \ + --values helm/values-sit.yaml | kubectl apply --dry-run=client -f - ``` -Create the namespace and an opaque Secret containing a repository-scoped, read-only GitHub credential. Never commit the token or place it in Helm values: +Create the namespace and an opaque Secret containing a repository-scoped, read-only GitHub credential. Never commit the token or place it in Helm values. The Helm values file points to this existing Secret by name only: ```bash kubectl create namespace digital-bank-sit --dry-run=client -o yaml | @@ -218,6 +220,7 @@ Install or upgrade the release in the SIT namespace: helm upgrade --install config-server helm \ --namespace digital-bank-sit \ --create-namespace \ + --values helm/values-sit.yaml \ --wait \ --timeout 5m ``` diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 405d8e3..a0761ea 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -32,18 +32,18 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: CONFIG_REPO_URI - value: {{ .Values.configRepository.uri | quote }} + value: {{ required "configRepository.uri is required" .Values.configRepository.uri | quote }} - name: CONFIG_REPO_DEFAULT_LABEL - value: {{ .Values.configRepository.defaultLabel | quote }} + value: {{ required "configRepository.defaultLabel is required" .Values.configRepository.defaultLabel | quote }} - name: CONFIG_REPO_USERNAME valueFrom: secretKeyRef: - name: {{ .Values.configRepository.credentialsSecret.name }} + name: {{ required "configRepository.credentialsSecret.name is required" .Values.configRepository.credentialsSecret.name }} key: {{ .Values.configRepository.credentialsSecret.usernameKey }} - name: CONFIG_REPO_TOKEN valueFrom: secretKeyRef: - name: {{ .Values.configRepository.credentialsSecret.name }} + name: {{ required "configRepository.credentialsSecret.name is required" .Values.configRepository.credentialsSecret.name }} key: {{ .Values.configRepository.credentialsSecret.tokenKey }} securityContext: {{- toYaml .Values.containerSecurityContext | nindent 12 }} diff --git a/helm/values-sit.yaml b/helm/values-sit.yaml new file mode 100644 index 0000000..1294469 --- /dev/null +++ b/helm/values-sit.yaml @@ -0,0 +1,5 @@ +configRepository: + uri: https://github.com/digital-bank-java/config-repo.git + defaultLabel: main + credentialsSecret: + name: config-server-git-credentials diff --git a/helm/values.yaml b/helm/values.yaml index fb01974..1795c75 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -9,10 +9,10 @@ image: pullPolicy: IfNotPresent configRepository: - uri: https://github.com/digital-bank-java/config-repo.git - defaultLabel: main + uri: "" + defaultLabel: "" credentialsSecret: - name: config-server-git-credentials + name: "" usernameKey: username tokenKey: token From 7b4d5213d6d87cd163567cece1716ece38b45d13 Mon Sep 17 00:00:00 2001 From: Rami Mohamed Date: Sun, 2 Aug 2026 13:08:24 +0400 Subject: [PATCH 2/2] docs: fix SIT Helm lint command in workflow guide --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c0634b7..83b27a5 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ Before opening a pull request: ```bash git status ./mvnw verify -helm lint helm --strict +helm lint helm --strict --values helm/values-sit.yaml git diff --check ```