File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -796,16 +796,17 @@ install_snapshot_controller() {
796
796
echo " kubectl apply -f ${SNAPSHOT_CONTROLLER_YAML} (modified)"
797
797
done
798
798
else
799
- echo " kubectl apply -f ${CONTROLLER_DIR} /deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml "
800
- kubectl apply -f " ${CONTROLLER_DIR} /deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml "
799
+ echo " kubectl apply -f $SNAPSHOT_CONTROLLER_YAML "
800
+ kubectl apply -f " $SNAPSHOT_CONTROLLER_YAML "
801
801
fi
802
802
803
803
cnt=0
804
- expected_running_pods=$( curl https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/" ${CSI_SNAPSHOTTER_VERSION} " /deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml | grep replicas | cut -d ' :' -f 2-)
805
- while [ " $( kubectl get pods -l app=snapshot-controller | grep ' Running' -c) " -lt " $expected_running_pods " ]; do
804
+ expected_running_pods=$( kubectl apply --dry-run=client -o " jsonpath={.spec.replicas}" -f " $SNAPSHOT_CONTROLLER_YAML " )
805
+ expected_namespace=$( kubectl apply --dry-run=client -o " jsonpath={.metadata.namespace}" -f " $SNAPSHOT_CONTROLLER_YAML " )
806
+ while [ " $( kubectl get pods -n " $expected_namespace " -l app=snapshot-controller | grep ' Running' -c) " -lt " $expected_running_pods " ]; do
806
807
if [ $cnt -gt 30 ]; then
807
808
echo " snapshot-controller pod status:"
808
- kubectl describe pods -l app=snapshot-controller
809
+ kubectl describe pods -n " $expected_namespace " - l app=snapshot-controller
809
810
echo >&2 " ERROR: snapshot controller not ready after over 5 min"
810
811
exit 1
811
812
fi
You can’t perform that action at this time.
0 commit comments