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
14f7b959
Commit
14f7b959
authored
May 16, 2018
by
stewart-yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify cloud-controller manager config struct to adapt option change
parent
bbb48fd0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
55 deletions
+65
-55
config.go
cmd/cloud-controller-manager/app/config/config.go
+26
-16
controllermanager.go
cmd/cloud-controller-manager/app/controllermanager.go
+39
-39
No files found.
cmd/cloud-controller-manager/app/config/config.go
View file @
14f7b959
...
@@ -17,25 +17,39 @@ limitations under the License.
...
@@ -17,25 +17,39 @@ limitations under the License.
package
app
package
app
import
(
import
(
"time"
apiserver
"k8s.io/apiserver/pkg/server"
clientset
"k8s.io/client-go/kubernetes"
restclient
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/record"
genericcontrollermanager
"k8s.io/kubernetes/cmd/controller-manager/app"
genericcontrollermanager
"k8s.io/kubernetes/cmd/controller-manager/app"
"k8s.io/kubernetes/pkg/apis/componentconfig"
)
)
// ExtraConfig are part of Config, also can place your custom config here.
type
ExtraConfig
struct
{
NodeStatusUpdateFrequency
time
.
Duration
}
// Config is the main context object for the cloud controller manager.
// Config is the main context object for the cloud controller manager.
type
Config
struct
{
type
Config
struct
{
Generic
genericcontrollermanager
.
Config
ComponentConfig
componentconfig
.
CloudControllerManagerConfiguration
Extra
ExtraConfig
SecureServing
*
apiserver
.
SecureServingInfo
// TODO: remove deprecated insecure serving
InsecureServing
*
genericcontrollermanager
.
InsecureServingInfo
Authentication
apiserver
.
AuthenticationInfo
Authorization
apiserver
.
AuthorizationInfo
// the general kube client
Client
*
clientset
.
Clientset
// the client only used for leader election
LeaderElectionClient
*
clientset
.
Clientset
// the rest config for the master
Kubeconfig
*
restclient
.
Config
// the event sink
EventRecorder
record
.
EventRecorder
}
}
type
completedConfig
struct
{
type
completedConfig
struct
{
Generic
genericcontrollermanager
.
CompletedConfig
*
Config
Extra
*
ExtraConfig
}
}
// CompletedConfig same as Config, just to swap private object.
// CompletedConfig same as Config, just to swap private object.
...
@@ -46,10 +60,6 @@ type CompletedConfig struct {
...
@@ -46,10 +60,6 @@ type CompletedConfig struct {
// Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
// Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
func
(
c
*
Config
)
Complete
()
*
CompletedConfig
{
func
(
c
*
Config
)
Complete
()
*
CompletedConfig
{
cc
:=
completedConfig
{
cc
:=
completedConfig
{
c
}
c
.
Generic
.
Complete
(),
&
c
.
Extra
,
}
return
&
CompletedConfig
{
&
cc
}
return
&
CompletedConfig
{
&
cc
}
}
}
cmd/cloud-controller-manager/app/controllermanager.go
View file @
14f7b959
This diff is collapsed.
Click to expand it.
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