Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]enable kube-controller-manager able to start https #59408

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0da91a1
Split SecureServingOptions from apiserver specific loopback code
sttts Jan 31, 2018
8b10455
Add TODO for Config.LoopbackClientConfig
sttts Jan 31, 2018
aac5a90
fix type match and auto generated file
stewart-yu Feb 2, 2018
e15e505
enable kube-controller-manager able to start https
stewart-yu Feb 5, 2018
fc0f063
auto generated file
stewart-yu Feb 5, 2018
8c1cf1b
auto generated file
stewart-yu Feb 5, 2018
1eb9a0c
Towards controller manager config/options split
sttts Feb 6, 2018
1f4f798
Towards controller manager config/options split - step 2
sttts Feb 6, 2018
ff1aeb7
Towards controller manager config/options split - step 3
sttts Feb 6, 2018
db9f2b5
apiserver: move serving logic onto SecureServingInfo
sttts Feb 6, 2018
fd56224
Towards controller manager config/options split - step 4
sttts Feb 6, 2018
b4cc2fd
cloud-controller-manager: switch to apiserver https serving code
sttts Feb 6, 2018
a52b10b
fix kube-controller-manager compile err
stewart-yu Feb 7, 2018
2ecb71c
fix kube-controller-manager import cycle
stewart-yu Feb 7, 2018
54d8813
add parameter flag for ControllerManagerOptions
stewart-yu Feb 7, 2018
da2e313
fix kube-controller-manager import cycle
stewart-yu Feb 7, 2018
57679f4
kube-controller-manager: complete initial config-options split
sttts Feb 7, 2018
c0b96f5
add InsecureServingOptions for controller manager
stewart-yu Feb 7, 2018
569a107
Towards controller manager config/options split - step 6
sttts Feb 7, 2018
abbc72f
Remove non-generic createRecorder
sttts Feb 7, 2018
9f9fb92
Unify Serve func
sttts Feb 7, 2018
3ab6102
auto generated file
stewart-yu Feb 8, 2018
49329d0
fix UT test failed
stewart-yu Feb 8, 2018
d9e2f41
fix verify-golint.sh failure
stewart-yu Feb 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ filegroup(
":package-srcs",
"//cmd/clicheck:all-srcs",
"//cmd/cloud-controller-manager:all-srcs",
"//cmd/controller-manager/app/options:all-srcs",
"//cmd/controller-manager/app:all-srcs",
"//cmd/gendocs:all-srcs",
"//cmd/genkubedocs:all-srcs",
"//cmd/genman:all-srcs",
Expand Down
9 changes: 3 additions & 6 deletions cmd/cloud-controller-manager/app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ go_library(
srcs = ["controllermanager.go"],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager/app",
deps = [
"//cmd/cloud-controller-manager/app/config:go_default_library",
"//cmd/cloud-controller-manager/app/options:go_default_library",
"//pkg/api/legacyscheme:go_default_library",
"//cmd/controller-manager/app:go_default_library",
"//pkg/cloudprovider:go_default_library",
"//pkg/controller:go_default_library",
"//pkg/controller/cloud:go_default_library",
Expand All @@ -20,17 +21,12 @@ go_library(
"//pkg/util/configz:go_default_library",
"//pkg/version/verflag:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
"//vendor/github.com/spf13/cobra:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library",
"//vendor/k8s.io/client-go/informers:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library",
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
"//vendor/k8s.io/client-go/tools/leaderelection:go_default_library",
"//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library",
"//vendor/k8s.io/client-go/tools/record:go_default_library",
Expand All @@ -48,6 +44,7 @@ filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//cmd/cloud-controller-manager/app/config:all-srcs",
"//cmd/cloud-controller-manager/app/options:all-srcs",
],
tags = ["automanaged"],
Expand Down
23 changes: 23 additions & 0 deletions cmd/cloud-controller-manager/app/config/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["config.go"],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager/app/config",
visibility = ["//visibility:public"],
deps = ["//cmd/controller-manager/app:go_default_library"],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
55 changes: 55 additions & 0 deletions cmd/cloud-controller-manager/app/config/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
Copyright 2018 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package app

import (
"time"

genericcontrollermanager "k8s.io/kubernetes/cmd/controller-manager/app"
)

// ExtraConfig are part of Config, also can place you custom config here.
type ExtraConfig struct {
NodeStatusUpdateFrequency time.Duration
}

// Config is the main context object for the cloud controller manager.
type Config struct {
Generic genericcontrollermanager.Config
Extra ExtraConfig
}

type completedConfig struct {
Generic genericcontrollermanager.CompletedConfig
Extra *ExtraConfig
}

// CompletedConfig same as Config, just to swap private object.
type CompletedConfig struct {
// Embed a private pointer that cannot be instantiated outside of this package.
*completedConfig
}

// Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
func (c *Config) Complete() *CompletedConfig {
cc := completedConfig{
c.Generic.Complete(),
&c.Extra,
}

return &CompletedConfig{&cc}
}
Loading