Skip to content

Commit 168ae09

Browse files
authored
Purge yq3 (#432)
1 parent 366e85b commit 168ae09

File tree

9 files changed

+62
-61
lines changed

9 files changed

+62
-61
lines changed

bin/common.bash

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ check_tools() {
8989
warn=0
9090
err=0
9191

92-
for executable in jq yq4 sops kubectl helm helmfile terraform; do
92+
for executable in jq yq sops kubectl helm helmfile terraform; do
9393
if ! command -v "${executable}" >/dev/null; then
9494
log_error "Required dependency ${executable} missing"
9595
err=1
@@ -114,7 +114,7 @@ check_tools() {
114114
fi
115115
}
116116

117-
check_minor "$(yq4 '.[0].vars.terraform_version' "${req}")" "$(terraform --version --json | yq4 '.terraform_version')" "terraform"
117+
check_minor "$(yq '.[0].vars.terraform_version' "${req}")" "$(terraform --version --json | yq '.terraform_version')" "terraform"
118118

119119
if [[ "${warn}" != 0 ]]; then
120120
if [[ -t 1 ]]; then
@@ -133,13 +133,13 @@ validate_sops_config() {
133133
exit 1
134134
fi
135135

136-
rule_count=$(yq4 '.creation_rules | length' "${sops_config}")
136+
rule_count=$(yq '.creation_rules | length' "${sops_config}")
137137
if [ "${rule_count:-0}" -gt 1 ]; then
138138
log_error "ERROR: SOPS config has more than one creation rule."
139139
exit 1
140140
fi
141141

142-
fingerprints=$(yq4 '.creation_rules[0].pgp' "${sops_config}")
142+
fingerprints=$(yq '.creation_rules[0].pgp' "${sops_config}")
143143
if ! [[ "${fingerprints}" =~ ^[A-Z0-9,' ']+$ ]]; then
144144
log_error "ERROR: SOPS config contains no or invalid PGP keys."
145145
log_error "fingerprints=${fingerprints}"
@@ -176,7 +176,7 @@ append_trap() {
176176

177177
# Write PGP fingerprints to SOPS config
178178
sops_config_write_fingerprints() {
179-
yq4 -n '.creation_rules[0].pgp = "'"${1}"'"' >"${sops_config}" ||
179+
yq -n '.creation_rules[0].pgp = "'"${1}"'"' >"${sops_config}" ||
180180
(log_error "Failed to write fingerprints" && rm "${sops_config}" && exit 1)
181181
}
182182

@@ -331,7 +331,7 @@ ck8s_kubespray_version_check() {
331331
pushd "${root_path}" || exit
332332
version=$(git describe --exact-match --tags 2>/dev/null || git rev-parse HEAD)
333333
popd || exit
334-
version_in_config=$(yq4 .ck8sKubesprayVersion "${config_path}/group_vars/all/ck8s-kubespray-general.yaml")
334+
version_in_config=$(yq .ck8sKubesprayVersion "${config_path}/group_vars/all/ck8s-kubespray-general.yaml")
335335

336336
if [[ -z "${version_in_config}" || "${version_in_config}" == "null" ]]; then
337337
log_error "ERROR: No version set. Ensure that ${config_path}/group_vars/all/ck8s-kubespray-general.yaml exists and has ck8sKubesprayVersion set."
@@ -384,10 +384,10 @@ ops_kubectl() { # <prefix> <args...>
384384
assign_host() {
385385
local node=$1
386386
# Check for control plane nodes
387-
control_plane_label=$(yq4 .control_plane_label "${config_path}/group_vars/all/ck8s-kubespray-general.yaml")
387+
control_plane_label=$(yq .control_plane_label "${config_path}/group_vars/all/ck8s-kubespray-general.yaml")
388388
# Check for AMS
389-
primary_group_label=$(yq4 .group_label_primary "${config_path}/group_vars/all/ck8s-kubespray-general.yaml")
390-
secondary_group_label=$(yq4 .group_label_secondary "${config_path}/group_vars/all/ck8s-kubespray-general.yaml")
389+
primary_group_label=$(yq .group_label_primary "${config_path}/group_vars/all/ck8s-kubespray-general.yaml")
390+
secondary_group_label=$(yq .group_label_secondary "${config_path}/group_vars/all/ck8s-kubespray-general.yaml")
391391
if [[ $(ops_kubectl "$prefix" get node "$node" -ojson | jq ".metadata.labels | has(\"${control_plane_label}\")") == "true" ]]; then
392392
target_group="kube_control_plane"
393393
if [[ "$(group_exists "${config[groups_inventory_file]}" "$target_group")" != "true" ]]; then

docs/citycloud-snippets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ done
8585

8686
If all went well the infrastructure should now be up and running
8787

88-
## Compliantkubernetes kubespray
88+
## Welkin Kubespray
8989

9090
To set up kubernetes with compliantkubernetes-kubespray you can follow these steps.
9191

docs/migrate-from-cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This has only been tested on CityCloud and might not look the same for other clo
4747
export TF_VAR_ssh_pub_key_sc="${CK8S_CONFIG_PATH}/ssh/id_rsa_sc.pub"
4848
export TF_VAR_ssh_pub_key_wc="${CK8S_CONFIG_PATH}/ssh/id_rsa_wc.pub"
4949
export TF_DATA_DIR="${CK8S_CONFIG_PATH}/.state/.terraform"
50-
export TF_WORKSPACE=$(yq r ${CK8S_CONFIG_PATH}/config.yaml environment_name)
50+
export TF_WORKSPACE=$(yq ".environment_name" ${CK8S_CONFIG_PATH}/config.yaml)
5151
5252
terraform state show module.service_cluster.module.network.openstack_networking_network_v2.network
5353
.

release/qa-checklist.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ Elastisys Welkin® Kubespray
5353

5454
```bash
5555
# configure
56-
yq4 -i '.grafana.user.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml"
57-
yq4 -i '.grafana.ops.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml"
58-
yq4 -i 'with(.opensearch.extraRoleMappings[]; with(select(.mapping_name != "all_access"); .definition.users += ["[email protected]"]))' "${CK8S_CONFIG_PATH}/sc-config.yaml"
59-
yq4 -i '.user.adminUsers += ["[email protected]"]' "${CK8S_CONFIG_PATH}/wc-config.yaml"
60-
yq4 -i '.dex.enableStaticLogin = true' "${CK8S_CONFIG_PATH}/sc-config.yaml"
56+
yq -i '.grafana.user.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml"
57+
yq -i '.grafana.ops.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml"
58+
yq -i 'with(.opensearch.extraRoleMappings[]; with(select(.mapping_name != "all_access"); .definition.users += ["[email protected]"]))' "${CK8S_CONFIG_PATH}/sc-config.yaml"
59+
yq -i '.user.adminUsers += ["[email protected]"]' "${CK8S_CONFIG_PATH}/wc-config.yaml"
60+
yq -i '.dex.enableStaticLogin = true' "${CK8S_CONFIG_PATH}/sc-config.yaml"
6161

6262
# apply from the apps repository
6363
./bin/ck8s apply sc
@@ -69,8 +69,8 @@ Elastisys Welkin® Kubespray
6969
<details><summary>Commands</summary>
7070

7171
```sh
72-
yq4 -i '.grafana.user.trailingDots = false' "${CK8S_CONFIG_PATH}/sc-config.yaml"
73-
yq4 -i '.grafana.ops.trailingDots = false' "${CK8S_CONFIG_PATH}/sc-config.yaml"
72+
yq -i '.grafana.user.trailingDots = false' "${CK8S_CONFIG_PATH}/sc-config.yaml"
73+
yq -i '.grafana.ops.trailingDots = false' "${CK8S_CONFIG_PATH}/sc-config.yaml"
7474
7575
# apply from the apps repository
7676
./bin/ck8s ops helmfile sc -lapp=grafana diff
@@ -89,7 +89,7 @@ Elastisys Welkin® Kubespray
8989
- [ ] Successful `./bin/ck8s test sc|wc` from the apps repository
9090
- [ ] If possible let the environment stabilise into a steady state after the install
9191
- Best is to perform the install at the end of the day to give it the night to stabilise.
92-
- Otherwise give it at least one to two hours to stabilise if possible.
92+
- Otherwise, give it at least one to two hours to stabilise if possible.
9393

9494
#### Automated tests
9595

@@ -477,11 +477,11 @@ Elastisys Welkin® Kubespray
477477
478478
```bash
479479
# configure
480-
yq4 -i '.grafana.user.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml"
481-
yq4 -i '.grafana.ops.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml"
482-
yq4 -i 'with(.opensearch.extraRoleMappings[]; with(select(.mapping_name != "all_access"); .definition.users += ["[email protected]"]))' "${CK8S_CONFIG_PATH}/sc-config.yaml"
483-
yq4 -i '.user.adminUsers += ["[email protected]"]' "${CK8S_CONFIG_PATH}/wc-config.yaml"
484-
yq4 -i '.dex.enableStaticLogin = true' "${CK8S_CONFIG_PATH}/sc-config.yaml"
480+
yq -i '.grafana.user.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml"
481+
yq -i '.grafana.ops.oidc.allowedDomains += ["example.com"]' "${CK8S_CONFIG_PATH}/sc-config.yaml"
482+
yq -i 'with(.opensearch.extraRoleMappings[]; with(select(.mapping_name != "all_access"); .definition.users += ["[email protected]"]))' "${CK8S_CONFIG_PATH}/sc-config.yaml"
483+
yq -i '.user.adminUsers += ["[email protected]"]' "${CK8S_CONFIG_PATH}/wc-config.yaml"
484+
yq -i '.dex.enableStaticLogin = true' "${CK8S_CONFIG_PATH}/sc-config.yaml"
485485
486486
# apply from the apps repository
487487
./bin/ck8s apply sc
@@ -493,8 +493,8 @@ Elastisys Welkin® Kubespray
493493
<details><summary>Commands</summary>
494494
495495
```sh
496-
yq4 -i '.grafana.user.trailingDots = false' "${CK8S_CONFIG_PATH}/sc-config.yaml"
497-
yq4 -i '.grafana.ops.trailingDots = false' "${CK8S_CONFIG_PATH}/sc-config.yaml"
496+
yq -i '.grafana.user.trailingDots = false' "${CK8S_CONFIG_PATH}/sc-config.yaml"
497+
yq -i '.grafana.ops.trailingDots = false' "${CK8S_CONFIG_PATH}/sc-config.yaml"
498498
499499
# apply from the apps repository
500500
./bin/ck8s ops helmfile sc -lapp=grafana diff

rook/scripts/autoconfig.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ addressInSubnet() {
77

88
# fn <key> <addresses>
99
updatePeers() {
10-
peers="$(yq4 ".commons * .clusters.${cluster} | .networkPolicies.${1} | .[].cidr" "${CK8S_CONFIG_PATH}/rook/values.yaml")"
10+
peers="$(yq ".commons * .clusters.${cluster} | .networkPolicies.${1} | .[].cidr" "${CK8S_CONFIG_PATH}/rook/values.yaml")"
1111

1212
local -a update
1313

@@ -22,14 +22,14 @@ updatePeers() {
2222
update+=("${address}/32")
2323
done
2424

25-
old="$(yq4 -oj -I0 '[split(" ") | sort | .[] | {"cidr": .}]' <<<"$peers")"
26-
new="$(yq4 -oj -I0 '[split(" ") | sort | unique | .[] | {"cidr": .}]' <<<"${update[*]}")"
25+
old="$(yq -oj -I0 '[split(" ") | sort | .[] | {"cidr": .}]' <<<"$peers")"
26+
new="$(yq -oj -I0 '[split(" ") | sort | unique | .[] | {"cidr": .}]' <<<"${update[*]}")"
2727

28-
if ! diff -u3 --color --label "current .commons * .clusters.${cluster} | .${1}" <(yq4 -P <<<"$old") --label "update .cluster.${cluster}.${1}" <(yq4 -P <<<"$new"); then
28+
if ! diff -u3 --color --label "current .commons * .clusters.${cluster} | .${1}" <(yq -P <<<"$old") --label "update .cluster.${cluster}.${1}" <(yq -P <<<"$new"); then
2929
echo -n "apply update? [Y/n]: "
3030
read -r reply
3131
if [[ "${reply}" =~ ^(Y|y|)$ ]]; then
32-
yq4 -i ".clusters.${cluster}.networkPolicies.${1} = ${new}" "${CK8S_CONFIG_PATH}/rook/values.yaml"
32+
yq -i ".clusters.${cluster}.networkPolicies.${1} = ${new}" "${CK8S_CONFIG_PATH}/rook/values.yaml"
3333
fi
3434
else
3535
echo "- ${cluster}/networkPolicies/${1}: up to date"
@@ -42,7 +42,7 @@ if [[ -z "${CK8S_CONFIG_PATH:-}" ]]; then
4242
elif [[ -z "${1:-}" ]]; then
4343
echo "err: missing cluster name" >&2
4444
exit
45-
elif [[ "$(yq4 ".clusters | keys | [\"${1}\"] - . | length" "${CK8S_CONFIG_PATH}/rook/values.yaml")" == "1" ]]; then
45+
elif [[ "$(yq ".clusters | keys | [\"${1}\"] - . | length" "${CK8S_CONFIG_PATH}/rook/values.yaml")" == "1" ]]; then
4646
echo "err: invalid cluster name" >&2
4747
exit
4848
fi
@@ -56,15 +56,15 @@ else
5656
fi
5757

5858
apiserverAddresses="$(
59-
kubectl get no -lnode-role.kubernetes.io/control-plane= -oyaml | yq4 '[
59+
kubectl get no -lnode-role.kubernetes.io/control-plane= -oyaml | yq '[
6060
.items[] | [
6161
.status.addresses[] | select(.type == "InternalIP") | .address
6262
] + (
6363
.metadata.annotations | [."projectcalico.org/IPv4IPIPTunnelAddr", ."projectcalico.org/IPv4WireguardInterfaceAddr"]) | .[]] | sort | .[]'
6464
)"
6565

6666
nodeAddresses="$(
67-
kubectl get no -oyaml | yq4 '[
67+
kubectl get no -oyaml | yq '[
6868
.items[] | [
6969
.status.addresses[] | select(.type == "InternalIP") | .address
7070
] + (
@@ -97,12 +97,12 @@ pspcrds=(
9797
k8spspvolumetypes.constraints.gatekeeper.sh
9898
)
9999

100-
if [[ "$(yq4 ".commons * .clusters.${cluster} | .podSecurityPolicies.enabled" "${CK8S_CONFIG_PATH}/rook/values.yaml")" != "true" ]]; then
100+
if [[ "$(yq ".commons * .clusters.${cluster} | .podSecurityPolicies.enabled" "${CK8S_CONFIG_PATH}/rook/values.yaml")" != "true" ]]; then
101101
if kubectl get crds "${pspcrds[@]}" &>/dev/null; then
102102
echo -n "- enable Gatekeeper podsecuritypolicies? [Y/n]: "
103103
read -r reply
104104
if [[ "${reply}" =~ ^(Y|y|)$ ]]; then
105-
yq4 -i ".clusters.${cluster}.podSecurityPolicies.enabled = true" "${CK8S_CONFIG_PATH}/rook/values.yaml"
105+
yq -i ".clusters.${cluster}.podSecurityPolicies.enabled = true" "${CK8S_CONFIG_PATH}/rook/values.yaml"
106106
fi
107107
else
108108
echo "- warning: Gatekeeper constraints not available"
@@ -112,13 +112,13 @@ else
112112
fi
113113

114114
echo "checking service monitors..."
115-
if [[ "$(yq4 ".commons * .clusters.${cluster} | .monitoring.installServiceMonitors" "${CK8S_CONFIG_PATH}/rook/values.yaml")" != "true" ]]; then
115+
if [[ "$(yq ".commons * .clusters.${cluster} | .monitoring.installServiceMonitors" "${CK8S_CONFIG_PATH}/rook/values.yaml")" != "true" ]]; then
116116
if kubectl get crd prometheuses.monitoring.coreos.com &>/dev/null; then
117117
if [[ -n "$(kubectl get po -A -l app.kubernetes.io/name=prometheus 2>/dev/null)" ]]; then
118118
echo -n "- install Prometheus service monitors? [Y/n]: "
119119
read -r reply
120120
if [[ "${reply}" =~ ^(Y|y|)$ ]]; then
121-
yq4 -i ".clusters.${cluster}.monitoring.installServiceMonitors = true" "${CK8S_CONFIG_PATH}/rook/values.yaml"
121+
yq -i ".clusters.${cluster}.monitoring.installServiceMonitors = true" "${CK8S_CONFIG_PATH}/rook/values.yaml"
122122
fi
123123
else
124124
echo "- note: Prometheus not available"
@@ -131,12 +131,12 @@ else
131131
fi
132132

133133
echo "checking dashboards..."
134-
if [[ "$(yq4 ".commons * .clusters.${cluster} | .monitoring.installGrafanaDashboards" "${CK8S_CONFIG_PATH}/rook/values.yaml")" != "true" ]]; then
134+
if [[ "$(yq ".commons * .clusters.${cluster} | .monitoring.installGrafanaDashboards" "${CK8S_CONFIG_PATH}/rook/values.yaml")" != "true" ]]; then
135135
if [[ -n "$(kubectl get po -A -l app.kubernetes.io/name=grafana 2>/dev/null)" ]]; then
136136
echo -n "- install Grafana dashboards? [Y/n]: "
137137
read -r reply
138138
if [[ "${reply}" =~ ^(Y|y|)$ ]]; then
139-
yq4 -i ".clusters.${cluster}.monitoring.installGrafanaDashboards = true" "${CK8S_CONFIG_PATH}/rook/values.yaml"
139+
yq -i ".clusters.${cluster}.monitoring.installGrafanaDashboards = true" "${CK8S_CONFIG_PATH}/rook/values.yaml"
140140
fi
141141
else
142142
echo "- note: Grafana not available"
@@ -146,13 +146,13 @@ else
146146
fi
147147

148148
echo "checking rules..."
149-
if [[ "$(yq4 ".commons * .clusters.${cluster} | .monitoring.installPrometheusRules" "${CK8S_CONFIG_PATH}/rook/values.yaml")" != "true" ]]; then
149+
if [[ "$(yq ".commons * .clusters.${cluster} | .monitoring.installPrometheusRules" "${CK8S_CONFIG_PATH}/rook/values.yaml")" != "true" ]]; then
150150
if kubectl get crd prometheusrules.monitoring.coreos.com &>/dev/null; then
151151
if [[ -n "$(kubectl get po -A -l app.kubernetes.io/name=thanos 2>/dev/null)" ]]; then
152152
echo -n "- install Prometheus rules? [Y/n]: "
153153
read -r reply
154154
if [[ "${reply}" =~ ^(Y|y|)$ ]]; then
155-
yq4 -i ".clusters.${cluster}.monitoring.installPrometheusRules = true" "${CK8S_CONFIG_PATH}/rook/values.yaml"
155+
yq -i ".clusters.${cluster}.monitoring.installPrometheusRules = true" "${CK8S_CONFIG_PATH}/rook/values.yaml"
156156
fi
157157
else
158158
echo "- note: Thanos not available"

rook/scripts/test-rook.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ function testOSDs {
6363
# 2. cluster
6464
function testMons {
6565
numberOfMons=$(kubectl -n rook-ceph get deployments.apps -o=name | grep -c rook-ceph-mon)
66-
numberOfMonsDesired=$(yq4 ".commons.mon.count" "$CONFIG_FILE")
66+
numberOfMonsDesired=$(yq ".commons.mon.count" "$CONFIG_FILE")
6767
monDeployments=()
6868
read -r -d '' -a monDeployments <<<"$(kubectl -n rook-ceph get deployments.apps -o=json | jq -r '.items[].metadata.name' | grep "rook-ceph-mon")"
6969
if [[ -z $numberOfMonsDesired || $numberOfMonsDesired = "null" ]]; then
70-
numberOfMonsDesired=$(yq4 ".cephClusterSpec.mon.count" "${here}/../helmfile.d/upstream/rook-ceph-cluster/values.yaml")
70+
numberOfMonsDesired=$(yq ".cephClusterSpec.mon.count" "${here}/../helmfile.d/upstream/rook-ceph-cluster/values.yaml")
7171
fi
7272
if [[ ! $numberOfMons = "$numberOfMonsDesired" ]]; then
7373
echo "${numberOfMons}/${numberOfMonsDesired} deployments exist ❌"
@@ -87,20 +87,20 @@ function testMons {
8787
# 2. cluster
8888
function testMgrs {
8989
numberOfMgrs=$(kubectl -n rook-ceph get deployments.apps -o=name | grep -c rook-ceph-mgr)
90-
numberOfMgrsDesired=$(yq4 ".commons.mgr.count" "$CONFIG_FILE")
90+
numberOfMgrsDesired=$(yq ".commons.mgr.count" "$CONFIG_FILE")
9191
mgrDeployments=()
9292
read -r -d '' -a mgrDeployments <<<"$(kubectl -n rook-ceph get deployments.apps -o=json | jq -r '.items[].metadata.name' | grep "rook-ceph-mgr")"
9393
if [[ -z "$numberOfMgrsDesired" || "$numberOfMgrsDesired" = "null" ]]; then
9494
if [[ "${cluster}" = "sc" ]]; then
9595
TMP_DIR=$(mktemp -p /tmp -d rook-ceph-test.XXXXXX)
9696
append_trap "rm -rf ${TMP_DIR}" EXIT
9797
helmfile -e service write-values --output-file-template "${TMP_DIR}/{{ .State.BaseName }}-{{ .State.AbsPathSHA1 }}/{{ .Release.Name}}.yaml" &>/dev/null
98-
numberOfMgrsDesired=$(yq4 ".cephClusterSpec.mgr.count" "$(find "${TMP_DIR}"/helmfile-*/ -name "rook-ceph-cluster.yaml")")
98+
numberOfMgrsDesired=$(yq ".cephClusterSpec.mgr.count" "$(find "${TMP_DIR}"/helmfile-*/ -name "rook-ceph-cluster.yaml")")
9999
elif [[ "${cluster}" = "wc" ]]; then
100100
TMP_DIR=$(mktemp -p /tmp -d rook-ceph-test.XXXXXX)
101101
append_trap "rm -rf ${TMP_DIR}" EXIT
102102
helmfile -e workload write-values --output-file-template "${TMP_DIR}/{{ .State.BaseName }}-{{ .State.AbsPathSHA1 }}/{{ .Release.Name}}.yaml" &>/dev/null
103-
numberOfMgrsDesired=$(yq4 ".cephClusterSpec.mgr.count" "$(find "${TMP_DIR}"/helmfile-*/ -name "rook-ceph-cluster.yaml")")
103+
numberOfMgrsDesired=$(yq ".cephClusterSpec.mgr.count" "$(find "${TMP_DIR}"/helmfile-*/ -name "rook-ceph-cluster.yaml")")
104104
fi
105105
fi
106106
if [[ ! $numberOfMgrs = "$numberOfMgrsDesired" ]]; then
@@ -232,9 +232,9 @@ function test_rook() {
232232
targets=(
233233
"serviceMonitor/rook-ceph/rook-ceph-mgr/0 1"
234234
)
235-
if [[ $cluster = "sc" && $(yq4 ".clusters.service.monitoring.installServiceMonitors" "$CONFIG_FILE") = true ]]; then
235+
if [[ $cluster = "sc" && $(yq ".clusters.service.monitoring.installServiceMonitors" "$CONFIG_FILE") = true ]]; then
236236
test_targets_retry "svc/kube-prometheus-stack-prometheus" "${targets[@]}"
237-
elif [[ $cluster = "wc" && $(yq4 ".clusters.workload.monitoring.installServiceMonitors" "$CONFIG_FILE") = true ]]; then
237+
elif [[ $cluster = "wc" && $(yq ".clusters.workload.monitoring.installServiceMonitors" "$CONFIG_FILE") = true ]]; then
238238
test_targets_retry "svc/kube-prometheus-stack-prometheus" "${targets[@]}"
239239
else
240240
echo "ServiceMontiors not enabled in $cluster - Skipping"

scripts/migration/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ config_version() {
7171
local prefix="${1}"
7272

7373
local version
74-
version="$(yq4 ".ck8sKubesprayVersion" <<<"${CONFIG["${prefix}"]}")"
74+
version="$(yq ".ck8sKubesprayVersion" <<<"${CONFIG["${prefix}"]}")"
7575

7676
VERSION["${prefix}-config"]="${version}"
7777
version="${version#v}"

0 commit comments

Comments
 (0)