mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
Merge pull request #93311 from logicalhan/monitoring-role
Add bootstrap policy for monitoring endpoints
This commit is contained in:
@@ -699,6 +699,9 @@ function create-master-auth {
|
||||
append_or_replace_prefixed_line "${known_tokens_csv}" "${KONNECTIVITY_SERVER_TOKEN}," "system:konnectivity-server,uid:system:konnectivity-server"
|
||||
create-kubeconfig "konnectivity-server" "${KONNECTIVITY_SERVER_TOKEN}"
|
||||
fi
|
||||
if [[ -n "${MONITORING_TOKEN:-}" ]]; then
|
||||
append_or_replace_prefixed_line "${known_tokens_csv}" "${MONITORING_TOKEN}," "system:monitoring,uid:system:monitoring,system:monitoring"
|
||||
fi
|
||||
|
||||
if [[ -n "${EXTRA_STATIC_AUTH_COMPONENTS:-}" ]]; then
|
||||
# Create a static Bearer token and kubeconfig for extra, comma-separated components.
|
||||
@@ -2936,7 +2939,9 @@ function main() {
|
||||
if [[ "${ENABLE_EGRESS_VIA_KONNECTIVITY_SERVICE:-false}" == "true" ]]; then
|
||||
KONNECTIVITY_SERVER_TOKEN="$(secure_random 32)"
|
||||
fi
|
||||
|
||||
if [[ "${ENABLE_MONITORING_TOKEN:-false}" == "true" ]]; then
|
||||
MONITORING_TOKEN="$(secure_random 32)"
|
||||
fi
|
||||
|
||||
setup-os-params
|
||||
config-ip-firewall
|
||||
|
Reference in New Issue
Block a user