Skip to content

Commit

Permalink
Make it easy to rebuild the password file
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Wall <pete.wall@grafana.com>
  • Loading branch information
petewall committed Nov 25, 2024
1 parent 2d1654d commit fc2f537
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
htpasswd
6 changes: 6 additions & 0 deletions charts/k8s-monitoring/tests/integration/auth/configs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
htpasswd:
htpasswd -c -B -b htpasswd promuser prompassword
htpasswd -B -b htpasswd oteluser otelpassword

passwords.yaml: htpasswd
kubectl create secret generic passwords --from-file=htpasswd -o yaml --dry-run=client > passwords.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
apiVersion: v1

Check failure on line 1 in charts/k8s-monitoring/tests/integration/auth/configs/passwords.yaml

View workflow job for this annotation

GitHub Actions / runner / yamllint

[yamllint] reported by reviewdog 🐶 [warning] missing document start "---" (document-start) Raw Output: ./charts/k8s-monitoring/tests/integration/auth/configs/passwords.yaml:1:1: [warning] missing document start "---" (document-start)
data:
htpasswd: cHJvbXVzZXI6JDJ5JDA1JGhuSkJnLzM2QWFkY0RBUG1xazZacE9UaTl6ZHkycG9uU1FXYjFuZzBQOEsvejlJSnhZUHRTCm90ZWx1c2VyOiQyeSQwNSQ5aHpUdFZGRnBxY3U5NnZWTmRlcmt1Tzc0Tk43M0hiaU1MY0JObTdtWWxlaTluVVJxRGI2aQo=
kind: Secret
metadata:
creationTimestamp: null
name: passwords
stringData:
htpasswd: |-
promuser:$1$U8rZL/KV$zJKBFBZnXXBc.kztxoGg2.:prompassword
oteluser:$1$yO5Ig8p/$j.1w61d8O8rTF9c0xAXPo/:otelpassword

0 comments on commit fc2f537

Please sign in to comment.