File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -796,16 +796,17 @@ install_snapshot_controller() {
796796 echo " kubectl apply -f ${SNAPSHOT_CONTROLLER_YAML} (modified)"
797797 done
798798 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 "
801801 fi
802802
803803 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
806807 if [ $cnt -gt 30 ]; then
807808 echo " snapshot-controller pod status:"
808- kubectl describe pods -l app=snapshot-controller
809+ kubectl describe pods -n " $expected_namespace " - l app=snapshot-controller
809810 echo >&2 " ERROR: snapshot controller not ready after over 5 min"
810811 exit 1
811812 fi
You can’t perform that action at this time.
0 commit comments