Commit bbb48fd0 authored by stewart-yu's avatar stewart-yu

[kube-controller manager]get rid of GenericControllerManagerOptions sub-struct

parent 2a8d258f
...@@ -22,6 +22,16 @@ import ( ...@@ -22,6 +22,16 @@ import (
"k8s.io/kubernetes/pkg/apis/componentconfig" "k8s.io/kubernetes/pkg/apis/componentconfig"
) )
const (
// These defaults are deprecated and exported so that we can warn if
// they are being used.
// DefaultClusterSigningCertFile is deprecated. Do not use.
DefaultClusterSigningCertFile = "/etc/kubernetes/ca/ca.pem"
// DefaultClusterSigningKeyFile is deprecated. Do not use.
DefaultClusterSigningKeyFile = "/etc/kubernetes/ca/ca.key"
)
// CSRSigningControllerOptions holds the CSRSigningController options. // CSRSigningControllerOptions holds the CSRSigningController options.
type CSRSigningControllerOptions struct { type CSRSigningControllerOptions struct {
ClusterSigningDuration metav1.Duration ClusterSigningDuration metav1.Duration
......
...@@ -113,10 +113,9 @@ func TestAddFlags(t *testing.T) { ...@@ -113,10 +113,9 @@ func TestAddFlags(t *testing.T) {
f.Parse(args) f.Parse(args)
// Sort GCIgnoredResources because it's built from a map, which means the // Sort GCIgnoredResources because it's built from a map, which means the
// insertion order is random. // insertion order is random.
sort.Sort(sortedGCIgnoredResources(s.Generic.GarbageCollectorController.GCIgnoredResources)) sort.Sort(sortedGCIgnoredResources(s.GarbageCollectorController.GCIgnoredResources))
expected := &KubeControllerManagerOptions{ expected := &KubeControllerManagerOptions{
Generic: &cmoptions.GenericControllerManagerOptions{
CloudProvider: &cmoptions.CloudProviderOptions{ CloudProvider: &cmoptions.CloudProviderOptions{
Name: "gce", Name: "gce",
CloudConfigFile: "/cloud-config", CloudConfigFile: "/cloud-config",
...@@ -270,12 +269,11 @@ func TestAddFlags(t *testing.T) { ...@@ -270,12 +269,11 @@ func TestAddFlags(t *testing.T) {
}, },
Kubeconfig: "/kubeconfig", Kubeconfig: "/kubeconfig",
Master: "192.168.4.20", Master: "192.168.4.20",
},
} }
// Sort GCIgnoredResources because it's built from a map, which means the // Sort GCIgnoredResources because it's built from a map, which means the
// insertion order is random. // insertion order is random.
sort.Sort(sortedGCIgnoredResources(expected.Generic.GarbageCollectorController.GCIgnoredResources)) sort.Sort(sortedGCIgnoredResources(expected.GarbageCollectorController.GCIgnoredResources))
if !reflect.DeepEqual(expected, s) { if !reflect.DeepEqual(expected, s) {
t.Errorf("Got different run options than expected.\nDifference detected on:\n%s", diff.ObjectReflectDiff(expected, s)) t.Errorf("Got different run options than expected.\nDifference detected on:\n%s", diff.ObjectReflectDiff(expected, s))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment