Commit ec415a12 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #45119 from dims/set-default-host-path-as-provisioner

Automatic merge from submit-queue (batch tested with PRs 45860, 45119, 44525, 45625, 44403) Support running StatefulSetBasic e2e tests with local-up-cluster **What this PR does / why we need it**: Currently StatefulSet(s) fail when you use local-up-cluster without setting a cloud provider. In this PR, we use set the kubernetes.io/host-path provisioner as the default provisioner when there CLOUD_PROVIDER is not specified. This enables e2e test(s) (specifically StatefulSetBasic) to work. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
parents 0cf7fd85 49faff32
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
namespace: kube-system
name: standard
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
labels:
addonmanager.kubernetes.io/mode: Reconcile
provisioner: kubernetes.io/host-path
...@@ -761,11 +761,11 @@ function create_psp_policy { ...@@ -761,11 +761,11 @@ function create_psp_policy {
function create_storage_class { function create_storage_class {
if [ -z "$CLOUD_PROVIDER" ]; then if [ -z "$CLOUD_PROVIDER" ]; then
# No cloud provider -> no default storage class CLASS_FILE=${KUBE_ROOT}/cluster/addons/storage-class/local/default.yaml
return else
CLASS_FILE=${KUBE_ROOT}/cluster/addons/storage-class/${CLOUD_PROVIDER}/default.yaml
fi fi
CLASS_FILE=${KUBE_ROOT}/cluster/addons/storage-class/${CLOUD_PROVIDER}/default.yaml
if [ -e $CLASS_FILE ]; then if [ -e $CLASS_FILE ]; then
echo "Create default storage class for $CLOUD_PROVIDER" echo "Create default storage class for $CLOUD_PROVIDER"
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" create -f $CLASS_FILE ${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" create -f $CLASS_FILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment