mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +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:
|
||||
- get
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
|
@ -255,6 +255,9 @@ if [[ (( "${KUBE_FEATURE_GATES:-}" == *"AllAlpha=true"* ) || ( "${KUBE_FEATURE_G
|
||||
RUN_CONTROLLERS="${RUN_CONTROLLERS:-*,endpointslice}"
|
||||
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
|
||||
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}
|
||||
fi
|
||||
|
||||
# By default disable gkenetworkparamset controller in CCM
|
||||
RUN_CCM_CONTROLLERS="${RUN_CCM_CONTROLLERS:-*,-gkenetworkparamset}"
|
||||
|
||||
# Optional: set feature gates
|
||||
# shellcheck disable=SC2034 # Variables sourced in other scripts.
|
||||
FEATURE_GATES=${KUBE_FEATURE_GATES:-}
|
||||
|
@ -2246,7 +2246,6 @@ function start-kube-controller-manager {
|
||||
cp "${src_file}" /etc/kubernetes/manifests
|
||||
}
|
||||
|
||||
# (TODO/cloud-provider-gcp): Figure out how to inject
|
||||
# Starts cloud controller manager.
|
||||
# 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.
|
||||
@ -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"
|
||||
fi
|
||||
fi
|
||||
if [[ -n "${RUN_CONTROLLERS:-}" ]]; then
|
||||
params+=("--controllers=${RUN_CONTROLLERS}")
|
||||
if [[ -n "${RUN_CCM_CONTROLLERS:-}" ]]; then
|
||||
params+=("--controllers=${RUN_CCM_CONTROLLERS}")
|
||||
fi
|
||||
|
||||
echo "Converting manifest for cloud provider controller-manager"
|
||||
@ -3572,7 +3571,6 @@ function main() {
|
||||
log-wrap 'StartKonnectivityServer' start-konnectivity-server
|
||||
fi
|
||||
log-wrap 'StartKubeControllerManager' start-kube-controller-manager
|
||||
# (TODO/cloud-provider-gcp): Figure out how to inject
|
||||
if [[ "${CLOUD_PROVIDER_FLAG:-gce}" == "external" ]]; then
|
||||
log-wrap 'StartCloudControllerManager' start-cloud-controller-manager
|
||||
fi
|
||||
|
@ -1274,6 +1274,11 @@ EOF
|
||||
if [ -n "${RUN_CONTROLLERS:-}" ]; then
|
||||
cat >>"$file" <<EOF
|
||||
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
|
||||
fi
|
||||
if [ -n "${PROVIDER_VARS:-}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user