use 8443 for webhook port (#2458)

Signed-off-by: Jeff <zw0948@gmail.com>
This commit is contained in:
zryfish
2020-07-17 12:56:21 +08:00
committed by GitHub
parent a1767d4245
commit 97580d3776
4 changed files with 10 additions and 5 deletions

7
.gitignore vendored
View File

@@ -20,10 +20,6 @@ bin/
# Vscode files
.vscode/
tmp/
apiserver.local.config
# OSX trash
.DS_Store
api.json
@@ -32,3 +28,6 @@ cover.out
coverage.txt
kustomize/network/etcd
apiserver.local.config
tmp/

View File

@@ -10,5 +10,7 @@ RUN apk add --update ca-certificates && \
adduser -D -g kubesphere -u 1002 kubesphere && \
chown -R kubesphere:kubesphere /usr/local/bin/ks-apiserver
EXPOSE 9090
USER kubesphere
CMD ["sh"]

View File

@@ -11,4 +11,7 @@ RUN apk add --update ca-certificates && \
chown -R kubesphere:kubesphere /usr/local/bin/controller-manager
USER kubesphere
EXPOSE 8443 8080
CMD controller-manager

View File

@@ -156,7 +156,8 @@ func Run(s *options.KubeSphereControllerManagerOptions, stopCh <-chan struct{})
run := func(ctx context.Context) {
klog.V(0).Info("setting up manager")
mgr, err := manager.New(kubernetesClient.Config(), manager.Options{CertDir: s.WebhookCertDir})
// Use 8443 instead of 443 cause we need root permission to bind port 443
mgr, err := manager.New(kubernetesClient.Config(), manager.Options{CertDir: s.WebhookCertDir, Port: 8443})
if err != nil {
klog.Fatalf("unable to set up overall controller manager: %v", err)
}