fix(k8s-alpha): render the failback executor with the selected image

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pingqiuandClaude Opus 5.5 committed 2026-11-25 18:21:01 -08:00
1 parent b3e6cdd4b0
commit 3ff0a640fd
3 files changed
+15 -2

No files matched your search

+2 -1
View File
@@ -269,7 +269,8 @@ kubectl -n kube-system wait --for=condition=available deploy/sw-blockmaster --ti
log "apply CSI components"
kubectl apply -f "$ROOT/charts/seaweed-block/crds/swblockreplicafailbacks.block.seaweedfs.com.yaml" | tee "$ARTIFACT_DIR/apply-failback-crd.log"
kubectl apply -f "$ROOT/deploy/k8s/alpha/failback-executor.yaml" | tee "$ARTIFACT_DIR/apply-failback-executor.log"
bash "$ROOT/scripts/render-k8s-alpha-image.sh" "$IMAGE" "$ROOT/deploy/k8s/alpha/failback-executor.yaml" "$ARTIFACT_DIR/failback-executor.rendered.yaml"
kubectl apply -f "$ARTIFACT_DIR/failback-executor.rendered.yaml" | tee "$ARTIFACT_DIR/apply-failback-executor.log"
kubectl apply -f "$ROOT/deploy/k8s/alpha/csi-driver.yaml" | tee "$ARTIFACT_DIR/apply-csidriver.log"
kubectl apply -f "$CSI_CONTROLLER_RENDERED" | tee "$ARTIFACT_DIR/apply-csi-controller.log"
kubectl apply -f "$CSI_NODE_RENDERED" | tee "$ARTIFACT_DIR/apply-csi-node.log"
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Renders an alpha manifest written for the local image (sw-block:local,
# imagePullPolicy: Never) with the selected image, the way the stack itself is
# rendered: usage: render-k8s-alpha-image.sh IMAGE IN OUT
set -euo pipefail
[[ $# -eq 3 ]] || { echo "usage: $0 IMAGE IN OUT" >&2; exit 2; }
image_sed="$(printf '%s' "$1" | sed 's/[\/&]/\&/g')"
sed -e "s/sw-block:local/${image_sed}/g" \
-e "s/imagePullPolicy: Never/imagePullPolicy: IfNotPresent/g" \
"$2" >"$3"
grep -q "image: $1\$" "$3" || { echo "render-k8s-alpha-image: $3 does not name image $1" >&2; exit 1; }
+2 -1
View File
@@ -1546,7 +1546,8 @@ kubectl -n kube-system wait --for=condition=available deploy/sw-blockmaster --ti
log "apply CSI manifests"
kubectl apply -f "$ROOT/charts/seaweed-block/crds/swblockreplicafailbacks.block.seaweedfs.com.yaml" | tee "$ARTIFACT_DIR/apply-failback-crd.log"
kubectl apply -f "$ROOT/deploy/k8s/alpha/failback-executor.yaml" | tee "$ARTIFACT_DIR/apply-failback-executor.log"
bash "$ROOT/scripts/render-k8s-alpha-image.sh" "$IMAGE" "$ROOT/deploy/k8s/alpha/failback-executor.yaml" "$ARTIFACT_DIR/failback-executor.rendered.yaml"
kubectl apply -f "$ARTIFACT_DIR/failback-executor.rendered.yaml" | tee "$ARTIFACT_DIR/apply-failback-executor.log"
kubectl apply -f "$ROOT/deploy/k8s/alpha/csi-driver.yaml" | tee "$ARTIFACT_DIR/apply-csidriver.log"
kubectl apply -f "$CSI_CONTROLLER_RENDERED" | tee "$ARTIFACT_DIR/apply-csi-controller.log"
kubectl apply -f "$CSI_NODE_RENDERED" | tee "$ARTIFACT_DIR/apply-csi-node.log"