Skip to content

Commit 926826f

Browse files
Merge pull request #92 from AET-DevOps26/feature/security
fix: secure grafana pw
2 parents 3e73e17 + 01af332 commit 926826f

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/deploy-k8s.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ jobs:
5353
chmod 600 $HOME/.kube/config
5454
5555
- name: Deploy with Helm
56+
env:
57+
# Optional: when unset, the chart's fallback (admin/admin) applies.
58+
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
5659
run: |
5760
helm upgrade --install bytebite ./helm/bytebite \
5861
--namespace team-bytebite \
@@ -67,4 +70,5 @@ jobs:
6770
--set genai.openaiApiKey="${{ secrets.OPENAI_API_KEY }}" \
6871
--set userDb.password="${{ secrets.USER_DB_PASSWORD }}" \
6972
--set groceryDb.password="${{ secrets.GROCERY_DB_PASSWORD }}" \
70-
--set jwt.secret="${{ secrets.JWT_SECRET }}"
73+
--set jwt.secret="${{ secrets.JWT_SECRET }}" \
74+
${GRAFANA_ADMIN_PASSWORD:+--set monitoring.grafana.adminPassword="$GRAFANA_ADMIN_PASSWORD"}

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ The local Helm values also expose monitoring services when supported by your
193193
local cluster:
194194

195195
- Prometheus: http://localhost:9090
196-
- Grafana: http://localhost:3000 (`admin` / `bytebite`)
196+
- Grafana: http://localhost:3000 (`admin` / `admin`, the chart fallback)
197197

198198
#### Kubernetes Deployment to the AET cluster
199199

@@ -217,3 +217,16 @@ helm uninstall bytebite --namespace team-bytebite # To take down later
217217
The app is available at https://team-bytebite.stud.k8s.aet.cit.tum.de
218218
Grafana is available at https://team-bytebite.stud.k8s.aet.cit.tum.de/grafana
219219
when `monitoring.enabled` and `monitoring.grafana.ingress.enabled` are true.
220+
221+
#### Login credentials
222+
223+
For evaluation, both the deployed app and Grafana come with a ready-to-use login:
224+
225+
| Service | URL | Username | Password |
226+
| --- | --- | --- | --- |
227+
| ByteBite app | https://team-bytebite.stud.k8s.aet.cit.tum.de | `admin@bytebite.dev` | `password` |
228+
| Grafana | https://team-bytebite.stud.k8s.aet.cit.tum.de/grafana | `admin` | `bytebite` |
229+
230+
The app account is seeded by [`databases/user-db/init.sql`](databases/user-db/init.sql); you can
231+
also self-register a new account. The Grafana password is supplied at deploy time via the
232+
`GRAFANA_ADMIN_PASSWORD` GitHub Actions secret — the chart's built-in fallback is `admin` / `admin`.

helm/bytebite/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ monitoring:
130130
targetPort: 3000
131131
replicaCount: 1
132132
adminUser: admin
133-
adminPassword: bytebite
133+
# Fallback only. Real deploys override this via the GRAFANA_ADMIN_PASSWORD
134+
adminPassword: admin
134135
ingress:
135136
enabled: true
136137
path: /grafana

0 commit comments

Comments
 (0)