Skip to content

Commit

Permalink
Drop removed flag --insecure-port
Browse files Browse the repository at this point in the history
  • Loading branch information
acumino committed May 19, 2022
1 parent b303239 commit c64053a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion docs/extensions/controlplane-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The `command` field of the `kube-apiserver` container **shall** contain the [kub
* admission plugins (`--enable-admission-plugins`, `--disable-admission-plugins`)
* secure communications (`--etcd-cafile`, `--etcd-certfile`, `--etcd-keyfile`, ...)
* audit log (`--audit-log-*`)
* ports (`--insecure-port`, `--secure-port`)
* ports (`--secure-port`)

The kube-apiserver command line **shall not** contain any provider-specific flags, such as:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ func (k *kubeAPIServer) computeKubeAPIServerCommand() []string {
out = append(out, kutil.FeatureGatesToCommandLineParameter(k.values.FeatureGates))
}

out = append(out, "--insecure-port=0")

This comment has been minimized.

Copy link
@rfranzke

rfranzke May 20, 2022

Member

You should rather have a condition here: "if Kubernetes < 1.24 then out=append(out...)"

out = append(out, "--kubelet-preferred-address-types=InternalIP,Hostname,ExternalIP")
out = append(out, fmt.Sprintf("--kubelet-client-certificate=%s/%s", volumeMountPathKubeAPIServerToKubelet, secrets.DataKeyCertificate))
out = append(out, fmt.Sprintf("--kubelet-client-key=%s/%s", volumeMountPathKubeAPIServerToKubelet, secrets.DataKeyPrivateKey))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,6 @@ rules:
"--encryption-provider-config=/etc/kubernetes/etcd-encryption-secret/encryption-configuration.yaml",
"--event-ttl="+eventTTL.String(),
"--external-hostname="+externalHostname,
"--insecure-port=0",
"--kubelet-preferred-address-types=InternalIP,Hostname,ExternalIP",
"--kubelet-client-certificate=/srv/kubernetes/apiserver-kubelet/tls.crt",
"--kubelet-client-key=/srv/kubernetes/apiserver-kubelet/tls.key",
Expand Down

0 comments on commit c64053a

Please sign in to comment.