Skip to content

Commit

Permalink
chore: added theme to schema, demo files, silenced output
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Faber committed Nov 14, 2020
1 parent 56b0945 commit 90827a9
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions .demo/env/charts/keycloak.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
charts:
keycloak:
enabled: true
theme: otomi
realm: master
idp:
alias: redkubes-azure
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ node_modules/
!package*.json
!.cspell.json
*.DS_Store
.values/values-schema.yaml
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"CONTRIBUTING": "markdown"
},
"yaml.schemas": {
"http://json-schema.org/draft/2019-09/schema#": "values-schema.yaml"
"http://json-schema.org/draft/2019-09/schema#": "values-schema.yaml",
".values/values-schema.yaml": ".demo/env/*.yaml"
},
"shellformat.flag": "-i 2 -ci"
}
2 changes: 2 additions & 0 deletions bin/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ function generate_loose_schema() {
local targetPath="$ENV_DIR/.vscode/values-schema.yaml"
local sourcePath="$PWD/values-schema.yaml"
yq d $sourcePath '**.required.' | yq d - 'properties.toolsVersion' | yq d - 'properties.cluster' >$targetPath
# also put a copy in the .values folder for local hinting of .demo/env/*.yaml files:
[ "$PWD" != "/home/app/stack" ] && cp $targetPath .values/
echo "Stored JSON schema at: $targetPath"
}

Expand Down
3 changes: 2 additions & 1 deletion bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ ENV_DIR=${ENV_DIR:-./env}

readonly otomiSettings="$ENV_DIR/env/settings.yaml"
readonly clustersFile="$ENV_DIR/env/clusters.yaml"
readonly helmfileOutputHide="(skipping|basePath=|Decrypting)"
readonly helmfileOutputHide="(^\W+$|skipping|basePath=|Decrypting)"
readonly helmfileOutputHideTpl="(^[\W^-]+$|skipping|basePath=|Decrypting)"
readonly replacePathsPattern="s@../env@${ENV_DIR}@g"

get_k8s_version() {
Expand Down
2 changes: 1 addition & 1 deletion bin/otomi
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function execute() {
check_kube_context=0
validate_cluster_env
set -o pipefail
drun helmfile -e $CLOUD-$CLUSTER --quiet $@ template --skip-deps | grep -Ev $helmfileOutputHide
drun helmfile -e $CLOUD-$CLUSTER --quiet $@ template --skip-deps | grep -Ev $helmfileOutputHideTpl
;;
rotate-keys)
check_sops_file
Expand Down
2 changes: 1 addition & 1 deletion values-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ properties:
type: string
theme:
type: string
enum: [default]
enum: [default, otomi]
loki:
type: object
additionalProperties: false
Expand Down
7 changes: 4 additions & 3 deletions values/jobs/keycloak.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ tasks:
enabled: true
init:
image:
repository: curlimages/curl
repository: badouralix/curl-http2
script: |
{{ if $skipVerify }}export INSECURE='--insecure'{{ end }}
printf "Waiting until keycloak is accessible."
until $(curl "$INSECURE" --output /dev/null --silent --head --fail https://keycloak.{{ $v.cluster.domain }}); do
echo "Waiting until keycloak is accessible at https://keycloak.{{ $v.cluster.domain }}"
until $(curl $INSECURE --output /dev/null --silent --head --fail -I https://keycloak.{{ $v.cluster.domain }}); do
printf '.'
sleep 5
done
echo READY!
image:
repository: {{ $c | get "jobs.keycloak.image.repository" "otomi/tasks" }}
tag: {{ $c | get "jobs.keycloak.image.tag" "v0.2.1" }}
Expand Down

0 comments on commit 90827a9

Please sign in to comment.