Skip to content

Commit faa4e31

Browse files
committed
apps sc: Add migration for rclone network policy config
1 parent 1c9d3c2 commit faa4e31

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

migration/v0.37/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ As with all scripts in this repository `CK8S_CONFIG_PATH` is expected to be set.
146146

147147
```bash
148148
./migration/v0.37/apply/11-kube-prometheus-stack.sh execute
149+
150+
1. Update service and rclone networkpolicies:
151+
152+
```bash
153+
./migration/v0.37/prepare/40-service-rclone-netpol.sh
149154
```
150155
151156
1. Update apps configuration:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
HERE="$(dirname "$(readlink -f "${0}")")"
4+
ROOT="$(readlink -f "${HERE}/../../../")"
5+
6+
# shellcheck source=scripts/migration/lib.sh
7+
source "${ROOT}/scripts/migration/lib.sh"
8+
9+
if [[ "${CK8S_CLUSTER}" =~ ^(sc|both)$ ]]; then
10+
log_info "operation on service cluster"
11+
12+
if ! yq_null sc .networkPolicies.rcloneSync; then
13+
yq_move sc .networkPolicies.rcloneSync .networkPolicies.rclone
14+
fi
15+
if ! yq_null sc .networkPolicies.rclone.destinationObjectStorageS3; then
16+
yq_move sc .networkPolicies.rclone.destinationObjectStorageS3 .networkPolicies.rclone.sync.objectStorage
17+
fi
18+
if ! yq_null sc .networkPolicies.rclone.destinationObjectStorageSwift; then
19+
yq_move sc .networkPolicies.rclone.destinationObjectStorageSwift .networkPolicies.rclone.sync.objectStorageSwift
20+
fi
21+
if ! yq_null sc .networkPolicies.rclone.secondaryUrl; then
22+
yq_move sc .networkPolicies.rclone.secondaryUrl .networkPolicies.rclone.sync.secondaryUrl
23+
fi
24+
fi
25+
if [[ "${CK8S_CLUSTER}" =~ ^(wc|both)$ ]]; then
26+
log_info "no operation on workload cluster"
27+
fi

0 commit comments

Comments
 (0)