Skip to content

Commit c7af588

Browse files
separate sds-configurator deploy scripts
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
1 parent 4c03f79 commit c7af588

6 files changed

Lines changed: 26 additions & 34 deletions

File tree

.github/workflows/e2e-reusable-pipeline.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ jobs:
658658
659659
d8_queue
660660
661+
kubectl apply -f ../sds-node-configurator/mc.yaml
661662
kubectl apply -f mc.yaml
662663
echo "[INFO] Wait for sds-node-configurator"
663664
kubectl wait --for=jsonpath='{.status.phase}'=Ready modules sds-node-configurator --timeout=300s
@@ -672,8 +673,8 @@ jobs:
672673
echo "[INFO] Wait pods and webhooks sds-replicated pods"
673674
sds_pods_ready
674675
675-
chmod +x lvg-gen.sh
676-
./lvg-gen.sh
676+
chmod +x ../sds-node-configurator/lvg-gen.sh
677+
../sds-node-configurator/lvg-gen.sh
677678
678679
chmod +x rsc-gen.sh
679680
./rsc-gen.sh

.github/workflows/e2e-test-releases-reusable-pipeline.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -644,20 +644,9 @@ jobs:
644644
exit 1
645645
}
646646
647-
lvg_ready() {
648-
echo "[INFO] Wait for generated LVMVolumeGroup resources to be Ready"
649-
if ! kubectl wait -f sds-lvg.yaml --for=jsonpath='{.status.phase}'=Ready --timeout=300s; then
650-
echo "[ERROR] Generated LVMVolumeGroup resources did not become Ready"
651-
kubectl get lvmvolumegroup -o wide || true
652-
exit 1
653-
fi
654-
655-
echo "[SUCCESS] Generated LVMVolumeGroup resources are Ready"
656-
kubectl get lvmvolumegroup -o wide
657-
}
658-
659647
d8_queue
660648
649+
kubectl apply -f ../sds-node-configurator/mc.yaml
661650
kubectl apply -f mc.yaml
662651
echo "[INFO] Wait for sds-node-configurator"
663652
kubectl wait --for=jsonpath='{.status.phase}'=Ready modules sds-node-configurator --timeout=300s
@@ -672,9 +661,8 @@ jobs:
672661
echo "[INFO] Wait pods and webhooks sds-replicated pods"
673662
sds_pods_ready
674663
675-
chmod +x lvg-gen.sh
676-
./lvg-gen.sh
677-
lvg_ready
664+
chmod +x ../sds-node-configurator/lvg-gen.sh
665+
../sds-node-configurator/lvg-gen.sh
678666
679667
chmod +x rsc-gen.sh
680668
./rsc-gen.sh

test/dvp-static-cluster/storage/sds-local-volume/lsc-gen.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
set -euo pipefail
1818

1919
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
20-
lvg_generator_script="${script_dir}/../sds-replicated/lvg-gen.sh"
20+
lvg_generator_script="${script_dir}/../sds-node-configurator/lvg-gen.sh"
2121
manifest=sds-local-lsc.yaml
2222
localStorageClassName=nested-local-thin
2323
targetThinPoolName=thin-data
@@ -44,11 +44,6 @@ if [[ -z "${lvgs}" ]]; then
4444

4545
"${lvg_generator_script}"
4646

47-
if [[ -f "sds-lvg.yaml" ]]; then
48-
echo "[INFO] Wait for generated LVMVolumeGroup resources to become Ready"
49-
kubectl wait -f "sds-lvg.yaml" --for=jsonpath='{.status.phase}'=Ready --timeout=300s
50-
fi
51-
5247
lvgs=$(discover_lvgs)
5348
fi
5449

test/dvp-static-cluster/storage/sds-replicated/lvg-gen.sh renamed to test/dvp-static-cluster/storage/sds-node-configurator/lvg-gen.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
manifest=sds-lvg.yaml
17+
set -euo pipefail
18+
19+
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
20+
manifest="${script_dir}/sds-lvg.yaml"
1821
LVMVG_SIZE=45Gi
1922

2023
devs=$(kubectl get blockdevices.storage.deckhouse.io -o json | jq '.items[] | {name: .metadata.name, node: .status.nodeName, dev_path: .status.path}' -rc)
2124

22-
rm -rf "${manifest}"
25+
rm -f "${manifest}"
2326

2427
echo detected block devices: "$devs"
2528

@@ -55,3 +58,9 @@ EOF
5558
done
5659

5760
kubectl apply -f "${manifest}"
61+
62+
echo "[INFO] Wait for generated LVMVolumeGroup resources to become Ready"
63+
kubectl wait -f "${manifest}" --for=jsonpath='{.status.phase}'=Ready --timeout=300s
64+
65+
echo "[SUCCESS] Generated LVMVolumeGroup resources are Ready"
66+
kubectl get lvmvolumegroup -o wide
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: deckhouse.io/v1alpha1
3+
kind: ModuleConfig
4+
metadata:
5+
name: sds-node-configurator
6+
spec:
7+
version: 1
8+
enabled: true

test/dvp-static-cluster/storage/sds-replicated/mc.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
---
2-
apiVersion: deckhouse.io/v1alpha1
3-
kind: ModuleConfig
4-
metadata:
5-
name: sds-node-configurator
6-
spec:
7-
version: 1
8-
enabled: true
9-
---
101
apiVersion: deckhouse.io/v1alpha1
112
kind: ModuleConfig
123
metadata:

0 commit comments

Comments
 (0)