Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f35c3f18
Commit
f35c3f18
authored
Aug 07, 2018
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cloud-controller-manager: enable secure ports 10258, deprecate insecure port
parent
2548fb08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
options.go
cmd/cloud-controller-manager/app/options/options.go
+5
-4
ports.go
pkg/master/ports/ports.go
+4
-0
No files found.
cmd/cloud-controller-manager/app/options/options.go
View file @
f35c3f18
...
@@ -102,10 +102,7 @@ func NewCloudControllerManagerOptions() (*CloudControllerManagerOptions, error)
...
@@ -102,10 +102,7 @@ func NewCloudControllerManagerOptions() (*CloudControllerManagerOptions, error)
s
.
SecureServing
.
ServerCert
.
CertDirectory
=
"/var/run/kubernetes"
s
.
SecureServing
.
ServerCert
.
CertDirectory
=
"/var/run/kubernetes"
s
.
SecureServing
.
ServerCert
.
PairName
=
"cloud-controller-manager"
s
.
SecureServing
.
ServerCert
.
PairName
=
"cloud-controller-manager"
s
.
SecureServing
.
BindPort
=
ports
.
CloudControllerManagerPort
// disable secure serving for now
// TODO: enable HTTPS by default
s
.
SecureServing
.
BindPort
=
0
return
&
s
,
nil
return
&
s
,
nil
}
}
...
@@ -263,6 +260,10 @@ func (o *CloudControllerManagerOptions) Config() (*cloudcontrollerconfig.Config,
...
@@ -263,6 +260,10 @@ func (o *CloudControllerManagerOptions) Config() (*cloudcontrollerconfig.Config,
return
nil
,
err
return
nil
,
err
}
}
if
err
:=
o
.
SecureServing
.
MaybeDefaultWithSelfSignedCerts
(
"localhost"
,
nil
,
[]
net
.
IP
{
net
.
ParseIP
(
"127.0.0.1"
)});
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"error creating self-signed certificates: %v"
,
err
)
}
c
:=
&
cloudcontrollerconfig
.
Config
{}
c
:=
&
cloudcontrollerconfig
.
Config
{}
if
err
:=
o
.
ApplyTo
(
c
,
CloudControllerManagerUserAgent
);
err
!=
nil
{
if
err
:=
o
.
ApplyTo
(
c
,
CloudControllerManagerUserAgent
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
pkg/master/ports/ports.go
View file @
f35c3f18
...
@@ -32,6 +32,7 @@ const (
...
@@ -32,6 +32,7 @@ const (
InsecureKubeControllerManagerPort
=
10252
InsecureKubeControllerManagerPort
=
10252
// InsecureCloudControllerManagerPort is the default port for the cloud controller manager server.
// InsecureCloudControllerManagerPort is the default port for the cloud controller manager server.
// This value may be overridden by a flag at startup.
// This value may be overridden by a flag at startup.
// Deprecated: use the secure CloudControllerManagerPort instead.
InsecureCloudControllerManagerPort
=
10253
InsecureCloudControllerManagerPort
=
10253
// KubeletReadOnlyPort exposes basic read-only services from the kubelet.
// KubeletReadOnlyPort exposes basic read-only services from the kubelet.
// May be overridden by a flag at startup.
// May be overridden by a flag at startup.
...
@@ -45,4 +46,7 @@ const (
...
@@ -45,4 +46,7 @@ const (
// KubeControllerManagerPort is the default port for the controller manager status server.
// KubeControllerManagerPort is the default port for the controller manager status server.
// May be overridden by a flag at startup.
// May be overridden by a flag at startup.
KubeControllerManagerPort
=
10257
KubeControllerManagerPort
=
10257
// CloudControllerManagerPort is the default port for the cloud controller manager server.
// This value may be overridden by a flag at startup.
CloudControllerManagerPort
=
10258
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment