Skip to content

Commit

Permalink
fixup: new version of migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-f committed Jul 25, 2024
1 parent 0f95fb9 commit a40a934
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions migration/v0.40/prepare/20-update-google-dex-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ ROOT="$(readlink -f "${HERE}/../../../")"
# shellcheck source=scripts/migration/lib.sh
source "${ROOT}/scripts/migration/lib.sh"

output=$(sops -d --extract '["dex"]' "${CK8S_CONFIG_PATH}/secrets.yaml" | sed "s/^\([ \t]*\)adminEmail: \(.*\)$/\1domainToAdminEmail: \n\1 \'\*\': \2/" | yq4 '.' -o json)

sops --set "[\"dex\"] ${output}" "${CK8S_CONFIG_PATH}/secrets.yaml"
EDITOR='yq4 -i "with(.dex.connectors[]; with(select(.config | has(\"adminEmail\")); .config.domainToAdminEmail.\"*\" = .config.adminEmail | del(.config.adminEmail)))"' sops --config "${CK8S_CONFIG_PATH}/.sops.yaml" "${CK8S_CONFIG_PATH}/secrets.yaml"

0 comments on commit a40a934

Please sign in to comment.