From 6f10758446e8c1f8c862d09269c5698d81e8d0d1 Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Mon, 24 Jun 2019 23:45:40 +0800 Subject: [PATCH] followup of 79262 to cleanup PodPriority leftover --- cluster/gce/config-default.sh | 6 ------ cluster/gce/config-test.sh | 6 ------ cluster/gce/util.sh | 1 - cluster/kubemark/gce/config-default.sh | 6 ------ hack/local-up-cluster.sh | 17 ++--------------- hack/verify-shellcheck.sh | 2 +- 6 files changed, 3 insertions(+), 35 deletions(-) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 823d3c77dff..573b367e70a 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -452,12 +452,6 @@ KUBE_PROXY_DAEMONSET="${KUBE_PROXY_DAEMONSET:-false}" # true, false # Optional: duration of cluster signed certificates. CLUSTER_SIGNING_DURATION="${CLUSTER_SIGNING_DURATION:-}" -# Optional: enable pod priority -ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}" -if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then - FEATURE_GATES="${FEATURE_GATES},PodPriority=true" -fi - # Optional: enable certificate rotation of the kubelet certificates. ROTATE_CERTIFICATES="${ROTATE_CERTIFICATES:-}" diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 9a89f869fee..6bb1f2b8f8b 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -493,12 +493,6 @@ KUBE_PROXY_MODE="${KUBE_PROXY_MODE:-iptables}" # Optional: duration of cluster signed certificates. CLUSTER_SIGNING_DURATION="${CLUSTER_SIGNING_DURATION:-}" -# Optional: enable pod priority -ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}" -if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then - FEATURE_GATES="${FEATURE_GATES},PodPriority=true" -fi - # Optional: enable certificate rotation of the kubelet certificates. ROTATE_CERTIFICATES="${ROTATE_CERTIFICATES:-}" diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 490fc3288b0..2c360a83b99 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1178,7 +1178,6 @@ PROMETHEUS_TO_SD_ENDPOINT: $(yaml-quote ${PROMETHEUS_TO_SD_ENDPOINT:-}) PROMETHEUS_TO_SD_PREFIX: $(yaml-quote ${PROMETHEUS_TO_SD_PREFIX:-}) ENABLE_PROMETHEUS_TO_SD: $(yaml-quote ${ENABLE_PROMETHEUS_TO_SD:-false}) DISABLE_PROMETHEUS_TO_SD_IN_DS: $(yaml-quote ${DISABLE_PROMETHEUS_TO_SD_IN_DS:-false}) -ENABLE_POD_PRIORITY: $(yaml-quote ${ENABLE_POD_PRIORITY:-}) CONTAINER_RUNTIME: $(yaml-quote ${CONTAINER_RUNTIME:-}) CONTAINER_RUNTIME_ENDPOINT: $(yaml-quote ${CONTAINER_RUNTIME_ENDPOINT:-}) CONTAINER_RUNTIME_NAME: $(yaml-quote ${CONTAINER_RUNTIME_NAME:-}) diff --git a/cluster/kubemark/gce/config-default.sh b/cluster/kubemark/gce/config-default.sh index 882657687ff..e0388e2c3b9 100644 --- a/cluster/kubemark/gce/config-default.sh +++ b/cluster/kubemark/gce/config-default.sh @@ -132,12 +132,6 @@ FEATURE_GATES="${KUBE_FEATURE_GATES:-ExperimentalCriticalPodAnnotation=true}" # Enable a simple "AdvancedAuditing" setup for testing. ENABLE_APISERVER_ADVANCED_AUDIT="${ENABLE_APISERVER_ADVANCED_AUDIT:-false}" -# Optional: enable pod priority -ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}" -if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then - FEATURE_GATES="${FEATURE_GATES},PodPriority=true" -fi - # The number of services that are allowed to sync concurrently. Will be passed # into kube-controller-manager via `--concurrent-service-syncs` CONCURRENT_SERVICE_SYNCS="${CONCURRENT_SERVICE_SYNCS:-}" diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 99495ddac40..0deaeb93c05 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -81,8 +81,6 @@ STORAGE_BACKEND=${STORAGE_BACKEND:-"etcd3"} STORAGE_MEDIA_TYPE=${STORAGE_MEDIA_TYPE:-""} # preserve etcd data. you also need to set ETCD_DIR. PRESERVE_ETCD="${PRESERVE_ETCD:-false}" -# enable Pod priority and preemption -ENABLE_POD_PRIORITY_PREEMPTION=${ENABLE_POD_PRIORITY_PREEMPTION:-""} # enable kubernetes dashboard ENABLE_CLUSTER_DASHBOARD=${KUBE_ENABLE_CLUSTER_DASHBOARD:-false} @@ -106,7 +104,7 @@ export KUBE_PANIC_WATCH_DECODE_ERROR # Default list of admission Controllers to invoke prior to persisting objects in cluster # The order defined here does not matter. -ENABLE_ADMISSION_PLUGINS=${ENABLE_ADMISSION_PLUGINS:-"NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota"} +ENABLE_ADMISSION_PLUGINS=${ENABLE_ADMISSION_PLUGINS:-"NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,Priority,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota"} DISABLE_ADMISSION_PLUGINS=${DISABLE_ADMISSION_PLUGINS:-""} ADMISSION_CONTROL_CONFIG_FILE=${ADMISSION_CONTROL_CONFIG_FILE:-""} @@ -131,11 +129,6 @@ if [ "${CLOUD_PROVIDER}" == "openstack" ]; then fi fi -# set feature gates if enable Pod priority and preemption -if [ "${ENABLE_POD_PRIORITY_PREEMPTION}" == true ]; then - FEATURE_GATES="${FEATURE_GATES},PodPriority=true" -fi - # warn if users are running with swap allowed if [ "${FAIL_SWAP_ON}" == "false" ]; then echo "WARNING : The kubelet is configured to not fail even if swap is enabled; production deployments should disable swap." @@ -493,13 +486,6 @@ function start_apiserver { if [[ -n "${NODE_ADMISSION}" ]]; then security_admission=",NodeRestriction" fi - if [ "${ENABLE_POD_PRIORITY_PREEMPTION}" == true ]; then - security_admission=",Priority" - if [[ -n "${RUNTIME_CONFIG}" ]]; then - RUNTIME_CONFIG+="," - fi - RUNTIME_CONFIG+="scheduling.k8s.io/v1alpha1=true" - fi # Append security_admission plugin ENABLE_ADMISSION_PLUGINS="${ENABLE_ADMISSION_PLUGINS}${security_admission}" @@ -554,6 +540,7 @@ EOF fi APISERVER_LOG=${LOG_DIR}/kube-apiserver.log + # shellcheck disable=SC2086 ${CONTROLPLANE_SUDO} "${GO_OUT}/hyperkube" kube-apiserver "${authorizer_arg}" "${priv_arg}" ${runtime_config} \ ${cloud_config_arg} \ "${advertise_address}" \ diff --git a/hack/verify-shellcheck.sh b/hack/verify-shellcheck.sh index 39bc6a1c92a..2852c66df2b 100755 --- a/hack/verify-shellcheck.sh +++ b/hack/verify-shellcheck.sh @@ -173,7 +173,7 @@ else echo "$err" done echo - echo 'Please review the above warnings. You can test via "./hack/verify-shellcheck"' + echo 'Please review the above warnings. You can test via "./hack/verify-shellcheck.sh"' echo 'If the above warnings do not make sense, you can exempt this package from shellcheck' echo 'checking by adding it to hack/.shellcheck_failures (if your reviewer is okay with it).' echo