mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Merge pull request #115619 from jprzychodzen/cluster-kcm-ccm
[GCE] [cluster] Split run controllers per controller-manager
This commit is contained in:
commit
c2ad27aaa2
@ -45,6 +45,7 @@ rules:
|
|||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- update
|
- update
|
||||||
|
- patch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
@ -255,6 +255,9 @@ if [[ (( "${KUBE_FEATURE_GATES:-}" == *"AllAlpha=true"* ) || ( "${KUBE_FEATURE_G
|
|||||||
RUN_CONTROLLERS="${RUN_CONTROLLERS:-*,endpointslice}"
|
RUN_CONTROLLERS="${RUN_CONTROLLERS:-*,endpointslice}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# By default disable gkenetworkparamset controller in CCM
|
||||||
|
RUN_CCM_CONTROLLERS="${RUN_CCM_CONTROLLERS:-*,-gkenetworkparamset}"
|
||||||
|
|
||||||
# List of the set of feature gates recognized by the GCP CCM
|
# List of the set of feature gates recognized by the GCP CCM
|
||||||
export CCM_FEATURE_GATES="APIListChunking,APIPriorityAndFairness,APIResponseCompression,APIServerIdentity,APIServerTracing,AllAlpha,AllBeta,CustomResourceValidationExpressions,KMSv2,OpenAPIEnums,OpenAPIV3,RemainingItemCount,ServerSideFieldValidation,StorageVersionAPI,StorageVersionHash"
|
export CCM_FEATURE_GATES="APIListChunking,APIPriorityAndFairness,APIResponseCompression,APIServerIdentity,APIServerTracing,AllAlpha,AllBeta,CustomResourceValidationExpressions,KMSv2,OpenAPIEnums,OpenAPIV3,RemainingItemCount,ServerSideFieldValidation,StorageVersionAPI,StorageVersionHash"
|
||||||
|
|
||||||
|
@ -156,6 +156,9 @@ if [[ (( "${KUBE_FEATURE_GATES:-}" = *"AllAlpha=true"* ) || ( "${KUBE_FEATURE_GA
|
|||||||
RUN_CONTROLLERS=${RUN_CONTROLLERS:-*,endpointslice}
|
RUN_CONTROLLERS=${RUN_CONTROLLERS:-*,endpointslice}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# By default disable gkenetworkparamset controller in CCM
|
||||||
|
RUN_CCM_CONTROLLERS="${RUN_CCM_CONTROLLERS:-*,-gkenetworkparamset}"
|
||||||
|
|
||||||
# Optional: set feature gates
|
# Optional: set feature gates
|
||||||
# shellcheck disable=SC2034 # Variables sourced in other scripts.
|
# shellcheck disable=SC2034 # Variables sourced in other scripts.
|
||||||
FEATURE_GATES=${KUBE_FEATURE_GATES:-}
|
FEATURE_GATES=${KUBE_FEATURE_GATES:-}
|
||||||
|
@ -2246,7 +2246,6 @@ function start-kube-controller-manager {
|
|||||||
cp "${src_file}" /etc/kubernetes/manifests
|
cp "${src_file}" /etc/kubernetes/manifests
|
||||||
}
|
}
|
||||||
|
|
||||||
# (TODO/cloud-provider-gcp): Figure out how to inject
|
|
||||||
# Starts cloud controller manager.
|
# Starts cloud controller manager.
|
||||||
# It prepares the log file, loads the docker image, calculates variables, sets them
|
# It prepares the log file, loads the docker image, calculates variables, sets them
|
||||||
# in the manifest file, and then copies the manifest file to /etc/kubernetes/manifests.
|
# in the manifest file, and then copies the manifest file to /etc/kubernetes/manifests.
|
||||||
@ -2309,8 +2308,8 @@ function start-cloud-controller-manager {
|
|||||||
echo "None of the given feature gates (${FEATURE_GATES}) were found to be safe to pass to the CCM"
|
echo "None of the given feature gates (${FEATURE_GATES}) were found to be safe to pass to the CCM"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n "${RUN_CONTROLLERS:-}" ]]; then
|
if [[ -n "${RUN_CCM_CONTROLLERS:-}" ]]; then
|
||||||
params+=("--controllers=${RUN_CONTROLLERS}")
|
params+=("--controllers=${RUN_CCM_CONTROLLERS}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Converting manifest for cloud provider controller-manager"
|
echo "Converting manifest for cloud provider controller-manager"
|
||||||
@ -3572,7 +3571,6 @@ function main() {
|
|||||||
log-wrap 'StartKonnectivityServer' start-konnectivity-server
|
log-wrap 'StartKonnectivityServer' start-konnectivity-server
|
||||||
fi
|
fi
|
||||||
log-wrap 'StartKubeControllerManager' start-kube-controller-manager
|
log-wrap 'StartKubeControllerManager' start-kube-controller-manager
|
||||||
# (TODO/cloud-provider-gcp): Figure out how to inject
|
|
||||||
if [[ "${CLOUD_PROVIDER_FLAG:-gce}" == "external" ]]; then
|
if [[ "${CLOUD_PROVIDER_FLAG:-gce}" == "external" ]]; then
|
||||||
log-wrap 'StartCloudControllerManager' start-cloud-controller-manager
|
log-wrap 'StartCloudControllerManager' start-cloud-controller-manager
|
||||||
fi
|
fi
|
||||||
|
@ -1274,6 +1274,11 @@ EOF
|
|||||||
if [ -n "${RUN_CONTROLLERS:-}" ]; then
|
if [ -n "${RUN_CONTROLLERS:-}" ]; then
|
||||||
cat >>"$file" <<EOF
|
cat >>"$file" <<EOF
|
||||||
RUN_CONTROLLERS: $(yaml-quote "${RUN_CONTROLLERS}")
|
RUN_CONTROLLERS: $(yaml-quote "${RUN_CONTROLLERS}")
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
if [ -n "${RUN_CCM_CONTROLLERS:-}" ]; then
|
||||||
|
cat >>"$file" <<EOF
|
||||||
|
RUN_CCM_CONTROLLERS: $(yaml-quote "${RUN_CCM_CONTROLLERS}")
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ -n "${PROVIDER_VARS:-}" ]; then
|
if [ -n "${PROVIDER_VARS:-}" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user