mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
Add SETUP_KONNECTIVITY_SERVICE flag
This commit is contained in:
@@ -922,7 +922,7 @@ contexts:
|
||||
name: webhook
|
||||
EOF
|
||||
fi
|
||||
if [[ "${EGRESS_VIA_KONNECTIVITY_SERVICE:-false}" == "true" ]]; then
|
||||
if [[ "${SETUP_KONNECTIVITY_SERVICE:-false}" == "true" ]]; then
|
||||
if [[ "${KONNECTIVITY_SERVICE_PROXY_PROTOCOL_MODE:-grpc}" == 'grpc' ]]; then
|
||||
cat <<EOF >/etc/srv/kubernetes/egress_selector_configuration.yaml
|
||||
apiVersion: apiserver.k8s.io/v1beta1
|
||||
@@ -3028,7 +3028,7 @@ function main() {
|
||||
if [[ "${ENABLE_APISERVER_INSECURE_PORT:-false}" != "true" ]]; then
|
||||
KUBE_BOOTSTRAP_TOKEN="$(secure_random 32)"
|
||||
fi
|
||||
if [[ "${EGRESS_VIA_KONNECTIVITY_SERVICE:-false}" == "true" ]]; then
|
||||
if [[ "${SETUP_KONNECTIVITY_SERVICE:-false}" == "true" ]]; then
|
||||
KONNECTIVITY_SERVER_TOKEN="$(secure_random 32)"
|
||||
fi
|
||||
if [[ "${ENABLE_MONITORING_TOKEN:-false}" == "true" ]]; then
|
||||
|
@@ -341,17 +341,19 @@ function start-kube-apiserver {
|
||||
local csc_config_volume=""
|
||||
local default_konnectivity_socket_vol=""
|
||||
local default_konnectivity_socket_mnt=""
|
||||
if [[ "${EGRESS_VIA_KONNECTIVITY_SERVICE:-false}" == "true" ]]; then
|
||||
if [[ "${SETUP_KONNECTIVITY_SERVICE:-false}" == "true" ]]; then
|
||||
# Create the EgressSelectorConfiguration yaml file to control the Egress Selector.
|
||||
csc_config_mount="{\"name\": \"cscconfigmount\",\"mountPath\": \"/etc/srv/kubernetes/egress_selector_configuration.yaml\", \"readOnly\": false},"
|
||||
csc_config_volume="{\"name\": \"cscconfigmount\",\"hostPath\": {\"path\": \"/etc/srv/kubernetes/egress_selector_configuration.yaml\", \"type\": \"FileOrCreate\"}},"
|
||||
params+=" --egress-selector-config-file=/etc/srv/kubernetes/egress_selector_configuration.yaml"
|
||||
|
||||
# UDS socket for communication between apiserver and konnectivity-server
|
||||
local default_konnectivity_socket_path="/etc/srv/kubernetes/konnectivity-server"
|
||||
default_konnectivity_socket_vol="{ \"name\": \"konnectivity-socket\", \"hostPath\": {\"path\": \"${default_konnectivity_socket_path}\", \"type\": \"DirectoryOrCreate\"}},"
|
||||
default_konnectivity_socket_mnt="{ \"name\": \"konnectivity-socket\", \"mountPath\": \"${default_konnectivity_socket_path}\", \"readOnly\": false},"
|
||||
fi
|
||||
if [[ "${EGRESS_VIA_KONNECTIVITY:-false}" == "true" ]]; then
|
||||
params+=" --egress-selector-config-file=/etc/srv/kubernetes/egress_selector_configuration.yaml"
|
||||
fi
|
||||
|
||||
local container_env=""
|
||||
if [[ -n "${ENABLE_CACHE_MUTATION_DETECTOR:-}" ]]; then
|
||||
|
Reference in New Issue
Block a user