mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Merge pull request #67943 from Szetty/master
Automatic merge from submit-queue (batch tested with PRs 67745, 67432, 67569, 67825, 67943). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Add flag for disabling prometheus-to-sd only for daemon sets ```release-note NONE ```
This commit is contained in:
commit
7c2a9a0150
@ -2195,6 +2195,17 @@ function update-prometheus-to-sd-parameters {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Updates parameters in yaml file for prometheus-to-sd configuration in daemon sets, or
|
||||||
|
# removes component if it is disabled.
|
||||||
|
function update-daemon-set-prometheus-to-sd-parameters {
|
||||||
|
if [[ "${DISABLE_PROMETHEUS_TO_SD_IN_DS:-}" == "true" ]]; then
|
||||||
|
# Removes all lines between two patterns (throws away prometheus-to-sd)
|
||||||
|
sed -i -e "/# BEGIN_PROMETHEUS_TO_SD/,/# END_PROMETHEUS_TO_SD/d" "$1"
|
||||||
|
else
|
||||||
|
update-prometheus-to-sd-parameters $1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Updates parameters in yaml file for event-exporter configuration
|
# Updates parameters in yaml file for event-exporter configuration
|
||||||
function update-event-exporter {
|
function update-event-exporter {
|
||||||
local -r stackdriver_resource_model="${LOGGING_STACKDRIVER_RESOURCE_TYPES:-old}"
|
local -r stackdriver_resource_model="${LOGGING_STACKDRIVER_RESOURCE_TYPES:-old}"
|
||||||
@ -2245,7 +2256,7 @@ function setup-fluentd {
|
|||||||
sed -i -e "s@{{ fluentd_gcp_yaml_version }}@${fluentd_gcp_yaml_version}@g" "${fluentd_gcp_scaler_yaml}"
|
sed -i -e "s@{{ fluentd_gcp_yaml_version }}@${fluentd_gcp_yaml_version}@g" "${fluentd_gcp_scaler_yaml}"
|
||||||
fluentd_gcp_version="${FLUENTD_GCP_VERSION:-0.3-1.5.34-1-k8s-1}"
|
fluentd_gcp_version="${FLUENTD_GCP_VERSION:-0.3-1.5.34-1-k8s-1}"
|
||||||
sed -i -e "s@{{ fluentd_gcp_version }}@${fluentd_gcp_version}@g" "${fluentd_gcp_yaml}"
|
sed -i -e "s@{{ fluentd_gcp_version }}@${fluentd_gcp_version}@g" "${fluentd_gcp_yaml}"
|
||||||
update-prometheus-to-sd-parameters ${fluentd_gcp_yaml}
|
update-daemon-set-prometheus-to-sd-parameters ${fluentd_gcp_yaml}
|
||||||
start-fluentd-resource-update ${fluentd_gcp_yaml}
|
start-fluentd-resource-update ${fluentd_gcp_yaml}
|
||||||
update-container-runtime ${fluentd_gcp_configmap_yaml}
|
update-container-runtime ${fluentd_gcp_configmap_yaml}
|
||||||
update-node-journal ${fluentd_gcp_configmap_yaml}
|
update-node-journal ${fluentd_gcp_configmap_yaml}
|
||||||
@ -2331,7 +2342,7 @@ function start-kube-addons {
|
|||||||
cat > "$src_dir/kube-proxy/kube-proxy-ds.yaml" <<EOF
|
cat > "$src_dir/kube-proxy/kube-proxy-ds.yaml" <<EOF
|
||||||
$CUSTOM_KUBE_PROXY_YAML
|
$CUSTOM_KUBE_PROXY_YAML
|
||||||
EOF
|
EOF
|
||||||
update-prometheus-to-sd-parameters "$src_dir/kube-proxy/kube-proxy-ds.yaml"
|
update-daemon-set-prometheus-to-sd-parameters "$src_dir/kube-proxy/kube-proxy-ds.yaml"
|
||||||
fi
|
fi
|
||||||
prepare-kube-proxy-manifest-variables "$src_dir/kube-proxy/kube-proxy-ds.yaml"
|
prepare-kube-proxy-manifest-variables "$src_dir/kube-proxy/kube-proxy-ds.yaml"
|
||||||
setup-addon-manifests "addons" "kube-proxy"
|
setup-addon-manifests "addons" "kube-proxy"
|
||||||
@ -2493,7 +2504,7 @@ EOF
|
|||||||
if [[ "${ENABLE_METADATA_CONCEALMENT:-}" == "true" ]]; then
|
if [[ "${ENABLE_METADATA_CONCEALMENT:-}" == "true" ]]; then
|
||||||
setup-addon-manifests "addons" "metadata-proxy/gce"
|
setup-addon-manifests "addons" "metadata-proxy/gce"
|
||||||
local -r metadata_proxy_yaml="${dst_dir}/metadata-proxy/gce/metadata-proxy.yaml"
|
local -r metadata_proxy_yaml="${dst_dir}/metadata-proxy/gce/metadata-proxy.yaml"
|
||||||
update-prometheus-to-sd-parameters ${metadata_proxy_yaml}
|
update-daemon-set-prometheus-to-sd-parameters ${metadata_proxy_yaml}
|
||||||
fi
|
fi
|
||||||
if [[ "${ENABLE_ISTIO:-}" == "true" ]]; then
|
if [[ "${ENABLE_ISTIO:-}" == "true" ]]; then
|
||||||
if [[ "${ISTIO_AUTH_TYPE:-}" == "MUTUAL_TLS" ]]; then
|
if [[ "${ISTIO_AUTH_TYPE:-}" == "MUTUAL_TLS" ]]; then
|
||||||
|
@ -899,6 +899,7 @@ ENABLE_NODE_JOURNAL: $(yaml-quote ${ENABLE_NODE_JOURNAL:-false})
|
|||||||
PROMETHEUS_TO_SD_ENDPOINT: $(yaml-quote ${PROMETHEUS_TO_SD_ENDPOINT:-})
|
PROMETHEUS_TO_SD_ENDPOINT: $(yaml-quote ${PROMETHEUS_TO_SD_ENDPOINT:-})
|
||||||
PROMETHEUS_TO_SD_PREFIX: $(yaml-quote ${PROMETHEUS_TO_SD_PREFIX:-})
|
PROMETHEUS_TO_SD_PREFIX: $(yaml-quote ${PROMETHEUS_TO_SD_PREFIX:-})
|
||||||
ENABLE_PROMETHEUS_TO_SD: $(yaml-quote ${ENABLE_PROMETHEUS_TO_SD:-false})
|
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:-})
|
ENABLE_POD_PRIORITY: $(yaml-quote ${ENABLE_POD_PRIORITY:-})
|
||||||
CONTAINER_RUNTIME: $(yaml-quote ${CONTAINER_RUNTIME:-})
|
CONTAINER_RUNTIME: $(yaml-quote ${CONTAINER_RUNTIME:-})
|
||||||
CONTAINER_RUNTIME_ENDPOINT: $(yaml-quote ${CONTAINER_RUNTIME_ENDPOINT:-})
|
CONTAINER_RUNTIME_ENDPOINT: $(yaml-quote ${CONTAINER_RUNTIME_ENDPOINT:-})
|
||||||
|
Loading…
Reference in New Issue
Block a user