add option to set the value of the apiserver's insecure port

This commit is contained in:
Jake Sanders 2019-04-18 19:51:37 +00:00
parent 0772f852ad
commit 113ab741e6
2 changed files with 8 additions and 2 deletions

View File

@ -1593,6 +1593,10 @@ function start-kube-apiserver {
params+=" --etcd-servers-overrides=${ETCD_SERVERS_OVERRIDES:-}"
fi
params+=" --secure-port=443"
if [[ "${ENABLE_APISERVER_INSECURE_PORT:-true}" != "true" ]]; then
# Default is :8080
params+=" --insecure-port=0"
fi
params+=" --tls-cert-file=${APISERVER_SERVER_CERT_PATH}"
params+=" --tls-private-key-file=${APISERVER_SERVER_KEY_PATH}"
params+=" --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname"

View File

@ -32,8 +32,9 @@
{{container_env}}
"livenessProbe": {
"httpGet": {
"scheme": "HTTPS",
"host": "127.0.0.1",
"port": 8080,
"port": {{secure_port}},
"path": "/healthz?exclude=etcd"
},
"initialDelaySeconds": {{liveness_probe_initial_delay}},
@ -41,8 +42,9 @@
},
"readinessProbe": {
"httpGet": {
"scheme": "HTTPS",
"host": "127.0.0.1",
"port": 8080,
"port": {{secure_port}},
"path": "/healthz"
},
"periodSeconds": 1,