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
bbb48fd0
Commit
bbb48fd0
authored
May 16, 2018
by
stewart-yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[kube-controller manager]get rid of GenericControllerManagerOptions sub-struct
parent
2a8d258f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
csrsigningcontroller.go
cmd/controller-manager/app/options/csrsigningcontroller.go
+10
-0
options.go
cmd/controller-manager/app/options/options.go
+0
-0
options.go
cmd/kube-controller-manager/app/options/options.go
+0
-0
options_test.go
cmd/kube-controller-manager/app/options/options_test.go
+2
-4
No files found.
cmd/controller-manager/app/options/csrsigningcontroller.go
View file @
bbb48fd0
...
@@ -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
...
...
cmd/controller-manager/app/options/options.go
deleted
100644 → 0
View file @
2a8d258f
This diff is collapsed.
Click to expand it.
cmd/kube-controller-manager/app/options/options.go
View file @
bbb48fd0
This diff is collapsed.
Click to expand it.
cmd/kube-controller-manager/app/options/options_test.go
View file @
bbb48fd0
...
@@ -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
.
G
eneric
.
G
arbageCollectorController
.
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
.
G
eneric
.
G
arbageCollectorController
.
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.
\n
Difference detected on:
\n
%s"
,
diff
.
ObjectReflectDiff
(
expected
,
s
))
t
.
Errorf
(
"Got different run options than expected.
\n
Difference detected on:
\n
%s"
,
diff
.
ObjectReflectDiff
(
expected
,
s
))
...
...
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