Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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
```
Expand Down Expand Up @@ -291,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
```

Expand Down
8 changes: 4 additions & 4 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions helm/values-sit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
configRepository:
uri: https://github.com/digital-bank-java/config-repo.git
defaultLabel: main
credentialsSecret:
name: config-server-git-credentials
6 changes: 3 additions & 3 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down