Unverified Commit 6ce59dd1 authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #72584 from xing-yang/local_cluster

Install CRD's in local cluster
parents 3ebbbda3 36030137
......@@ -961,6 +961,18 @@ function create_storage_class {
fi
}
create_csi_crd() {
echo "create_csi_crd $1"
YAML_FILE=${KUBE_ROOT}/cluster/addons/storage-crds/$1.yaml
if [ -e $YAML_FILE ]; then
echo "Create $1 crd"
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" create -f $YAML_FILE
else
echo "No $1 available."
fi
}
function print_success {
if [[ "${START_MODE}" != "kubeletonly" ]]; then
if [[ "${ENABLE_DAEMON}" = false ]]; then
......@@ -1105,6 +1117,14 @@ if [[ "${DEFAULT_STORAGE_CLASS}" = "true" ]]; then
create_storage_class
fi
if [[ "${FEATURE_GATES:-}" == "AllAlpha=true" || "${FEATURE_GATES:-}" =~ "CSIDriverRegistry=true" ]]; then
create_csi_crd "csidriver"
fi
if [[ "${FEATURE_GATES:-}" == "AllAlpha=true" || "${FEATURE_GATES:-}" =~ "CSINodeInfo=true" ]]; then
create_csi_crd "csinodeinfo"
fi
print_success
if [[ "${ENABLE_DAEMON}" = false ]]; then
......
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