Skip to content

Commit

Permalink
Add secrets; adjust grafana update strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
MatTerra committed Oct 13, 2022
1 parent 8fbee7d commit d395d30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rm -rf manifests
mkdir -p manifests/setup

# Calling gojsontoyaml is optional, but we would like to generate yaml, not json
jsonnet -J vendor -m manifests "${1-main.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml' -- {}
jsonnet -J vendor -m manifests --ext-str "GITHUB_CLIENT_ID=$GITHUB_CLIENT_ID" --ext-str "GITHUB_CLIENT_SECRET=$GITHUB_CLIENT_SECRET" "${1-main.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml' -- {}

# Make sure to remove json files
find manifests -type f ! -name '*.yaml' -delete
Expand Down
7 changes: 5 additions & 2 deletions main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ local kp = (import 'kube-prometheus/main.libsonnet') +
'auth.github': {
enabled: true,
allow_sign_up: true,
client_id: '...',
client_secret: '...',
client_id: std.extVar('GITHUB_CLIENT_ID'),
client_secret: std.extVar('GITHUB_CLIENT_SECRET'),
scopes: 'user:email,read:org',
auth_url: 'https://github.com/login/oauth/authorize',
token_url: 'https://github.com/login/oauth/access_token',
Expand Down Expand Up @@ -155,6 +155,9 @@ local kp = (import 'kube-prometheus/main.libsonnet') +
grafana+:: {
deployment+: {
spec+: {
strategy+:{
type: "Recreate"
},
template+: {
spec+: {
volumes: std.map(
Expand Down

0 comments on commit d395d30

Please sign in to comment.