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
b3d10d04
Unverified
Commit
b3d10d04
authored
Oct 22, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 22, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69988 from bradhoekstra/fix-69445
Set the default for EnableServiceLinks only in Pod
parents
199cd1b8
409a48ef
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
29 deletions
+8
-29
pod_specs.go
pkg/api/testing/pod_specs.go
+0
-4
defaults_test.go
pkg/apis/apps/v1/defaults_test.go
+0
-7
defaults_test.go
pkg/apis/apps/v1beta1/defaults_test.go
+0
-2
defaults_test.go
pkg/apis/apps/v1beta2/defaults_test.go
+0
-7
defaults.go
pkg/apis/core/v1/defaults.go
+8
-4
defaults_test.go
pkg/apis/extensions/v1beta1/defaults_test.go
+0
-5
No files found.
pkg/api/testing/pod_specs.go
View file @
b3d10d04
...
@@ -24,26 +24,22 @@ import (
...
@@ -24,26 +24,22 @@ import (
// DeepEqualSafePodSpec returns a PodSpec which is ready to be used with apiequality.Semantic.DeepEqual
// DeepEqualSafePodSpec returns a PodSpec which is ready to be used with apiequality.Semantic.DeepEqual
func
DeepEqualSafePodSpec
()
api
.
PodSpec
{
func
DeepEqualSafePodSpec
()
api
.
PodSpec
{
grace
:=
int64
(
30
)
grace
:=
int64
(
30
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
return
api
.
PodSpec
{
return
api
.
PodSpec
{
RestartPolicy
:
api
.
RestartPolicyAlways
,
RestartPolicy
:
api
.
RestartPolicyAlways
,
DNSPolicy
:
api
.
DNSClusterFirst
,
DNSPolicy
:
api
.
DNSClusterFirst
,
TerminationGracePeriodSeconds
:
&
grace
,
TerminationGracePeriodSeconds
:
&
grace
,
SecurityContext
:
&
api
.
PodSecurityContext
{},
SecurityContext
:
&
api
.
PodSecurityContext
{},
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
}
}
}
}
// V1DeepEqualSafePodSpec returns a PodSpec which is ready to be used with apiequality.Semantic.DeepEqual
// V1DeepEqualSafePodSpec returns a PodSpec which is ready to be used with apiequality.Semantic.DeepEqual
func
V1DeepEqualSafePodSpec
()
v1
.
PodSpec
{
func
V1DeepEqualSafePodSpec
()
v1
.
PodSpec
{
grace
:=
int64
(
30
)
grace
:=
int64
(
30
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
return
v1
.
PodSpec
{
return
v1
.
PodSpec
{
RestartPolicy
:
v1
.
RestartPolicyAlways
,
RestartPolicy
:
v1
.
RestartPolicyAlways
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
TerminationGracePeriodSeconds
:
&
grace
,
TerminationGracePeriodSeconds
:
&
grace
,
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
EnableServiceLinks
:
&
enableServiceLinks
,
}
}
}
}
pkg/apis/apps/v1/defaults_test.go
View file @
b3d10d04
...
@@ -39,7 +39,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
...
@@ -39,7 +39,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
defaultLabels
:=
map
[
string
]
string
{
"foo"
:
"bar"
}
defaultLabels
:=
map
[
string
]
string
{
"foo"
:
"bar"
}
maxUnavailable
:=
intstr
.
FromInt
(
1
)
maxUnavailable
:=
intstr
.
FromInt
(
1
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -47,7 +46,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
...
@@ -47,7 +46,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
ObjectMeta
:
metav1
.
ObjectMeta
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Labels
:
defaultLabels
,
Labels
:
defaultLabels
,
...
@@ -60,7 +58,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
...
@@ -60,7 +58,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
}
}
tests
:=
[]
struct
{
tests
:=
[]
struct
{
...
@@ -178,7 +175,6 @@ func TestSetDefaultStatefulSet(t *testing.T) {
...
@@ -178,7 +175,6 @@ func TestSetDefaultStatefulSet(t *testing.T) {
var
defaultReplicas
int32
=
1
var
defaultReplicas
int32
=
1
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -186,7 +182,6 @@ func TestSetDefaultStatefulSet(t *testing.T) {
...
@@ -186,7 +182,6 @@ func TestSetDefaultStatefulSet(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
ObjectMeta
:
metav1
.
ObjectMeta
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Labels
:
defaultLabels
,
Labels
:
defaultLabels
,
...
@@ -291,7 +286,6 @@ func TestSetDefaultDeployment(t *testing.T) {
...
@@ -291,7 +286,6 @@ func TestSetDefaultDeployment(t *testing.T) {
defaultIntOrString
:=
intstr
.
FromString
(
"25%"
)
defaultIntOrString
:=
intstr
.
FromString
(
"25%"
)
differentIntOrString
:=
intstr
.
FromInt
(
5
)
differentIntOrString
:=
intstr
.
FromInt
(
5
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -299,7 +293,6 @@ func TestSetDefaultDeployment(t *testing.T) {
...
@@ -299,7 +293,6 @@ func TestSetDefaultDeployment(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
}
}
tests
:=
[]
struct
{
tests
:=
[]
struct
{
...
...
pkg/apis/apps/v1beta1/defaults_test.go
View file @
b3d10d04
...
@@ -38,7 +38,6 @@ func TestSetDefaultDeployment(t *testing.T) {
...
@@ -38,7 +38,6 @@ func TestSetDefaultDeployment(t *testing.T) {
defaultIntOrString
:=
intstr
.
FromString
(
"25%"
)
defaultIntOrString
:=
intstr
.
FromString
(
"25%"
)
differentIntOrString
:=
intstr
.
FromInt
(
5
)
differentIntOrString
:=
intstr
.
FromInt
(
5
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -46,7 +45,6 @@ func TestSetDefaultDeployment(t *testing.T) {
...
@@ -46,7 +45,6 @@ func TestSetDefaultDeployment(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
}
}
tests
:=
[]
struct
{
tests
:=
[]
struct
{
...
...
pkg/apis/apps/v1beta2/defaults_test.go
View file @
b3d10d04
...
@@ -39,7 +39,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
...
@@ -39,7 +39,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
defaultLabels
:=
map
[
string
]
string
{
"foo"
:
"bar"
}
defaultLabels
:=
map
[
string
]
string
{
"foo"
:
"bar"
}
maxUnavailable
:=
intstr
.
FromInt
(
1
)
maxUnavailable
:=
intstr
.
FromInt
(
1
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -47,7 +46,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
...
@@ -47,7 +46,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
ObjectMeta
:
metav1
.
ObjectMeta
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Labels
:
defaultLabels
,
Labels
:
defaultLabels
,
...
@@ -60,7 +58,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
...
@@ -60,7 +58,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
}
}
tests
:=
[]
struct
{
tests
:=
[]
struct
{
...
@@ -178,7 +175,6 @@ func TestSetDefaultStatefulSet(t *testing.T) {
...
@@ -178,7 +175,6 @@ func TestSetDefaultStatefulSet(t *testing.T) {
var
defaultReplicas
int32
=
1
var
defaultReplicas
int32
=
1
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -186,7 +182,6 @@ func TestSetDefaultStatefulSet(t *testing.T) {
...
@@ -186,7 +182,6 @@ func TestSetDefaultStatefulSet(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
ObjectMeta
:
metav1
.
ObjectMeta
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Labels
:
defaultLabels
,
Labels
:
defaultLabels
,
...
@@ -291,7 +286,6 @@ func TestSetDefaultDeployment(t *testing.T) {
...
@@ -291,7 +286,6 @@ func TestSetDefaultDeployment(t *testing.T) {
defaultIntOrString
:=
intstr
.
FromString
(
"25%"
)
defaultIntOrString
:=
intstr
.
FromString
(
"25%"
)
differentIntOrString
:=
intstr
.
FromInt
(
5
)
differentIntOrString
:=
intstr
.
FromInt
(
5
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -299,7 +293,6 @@ func TestSetDefaultDeployment(t *testing.T) {
...
@@ -299,7 +293,6 @@ func TestSetDefaultDeployment(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
}
}
tests
:=
[]
struct
{
tests
:=
[]
struct
{
...
...
pkg/apis/core/v1/defaults.go
View file @
b3d10d04
...
@@ -160,8 +160,16 @@ func SetDefaults_Pod(obj *v1.Pod) {
...
@@ -160,8 +160,16 @@ func SetDefaults_Pod(obj *v1.Pod) {
}
}
}
}
}
}
if
obj
.
Spec
.
EnableServiceLinks
==
nil
{
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
obj
.
Spec
.
EnableServiceLinks
=
&
enableServiceLinks
}
}
}
func
SetDefaults_PodSpec
(
obj
*
v1
.
PodSpec
)
{
func
SetDefaults_PodSpec
(
obj
*
v1
.
PodSpec
)
{
// New fields added here will break upgrade tests:
// https://github.com/kubernetes/kubernetes/issues/69445
// In most cases the new defaulted field can added to SetDefaults_Pod instead of here, so
// that it only materializes in the Pod object and not all objects with a PodSpec field.
if
obj
.
DNSPolicy
==
""
{
if
obj
.
DNSPolicy
==
""
{
obj
.
DNSPolicy
=
v1
.
DNSClusterFirst
obj
.
DNSPolicy
=
v1
.
DNSClusterFirst
}
}
...
@@ -182,10 +190,6 @@ func SetDefaults_PodSpec(obj *v1.PodSpec) {
...
@@ -182,10 +190,6 @@ func SetDefaults_PodSpec(obj *v1.PodSpec) {
if
obj
.
SchedulerName
==
""
{
if
obj
.
SchedulerName
==
""
{
obj
.
SchedulerName
=
v1
.
DefaultSchedulerName
obj
.
SchedulerName
=
v1
.
DefaultSchedulerName
}
}
if
obj
.
EnableServiceLinks
==
nil
{
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
obj
.
EnableServiceLinks
=
&
enableServiceLinks
}
}
}
func
SetDefaults_Probe
(
obj
*
v1
.
Probe
)
{
func
SetDefaults_Probe
(
obj
*
v1
.
Probe
)
{
if
obj
.
TimeoutSeconds
==
0
{
if
obj
.
TimeoutSeconds
==
0
{
...
...
pkg/apis/extensions/v1beta1/defaults_test.go
View file @
b3d10d04
...
@@ -40,7 +40,6 @@ import (
...
@@ -40,7 +40,6 @@ import (
func
TestSetDefaultDaemonSetSpec
(
t
*
testing
.
T
)
{
func
TestSetDefaultDaemonSetSpec
(
t
*
testing
.
T
)
{
defaultLabels
:=
map
[
string
]
string
{
"foo"
:
"bar"
}
defaultLabels
:=
map
[
string
]
string
{
"foo"
:
"bar"
}
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -48,7 +47,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
...
@@ -48,7 +47,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
ObjectMeta
:
metav1
.
ObjectMeta
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Labels
:
defaultLabels
,
Labels
:
defaultLabels
,
...
@@ -61,7 +59,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
...
@@ -61,7 +59,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
}
}
tests
:=
[]
struct
{
tests
:=
[]
struct
{
...
@@ -167,7 +164,6 @@ func TestSetDefaultDeployment(t *testing.T) {
...
@@ -167,7 +164,6 @@ func TestSetDefaultDeployment(t *testing.T) {
defaultIntOrString
:=
intstr
.
FromInt
(
1
)
defaultIntOrString
:=
intstr
.
FromInt
(
1
)
differentIntOrString
:=
intstr
.
FromInt
(
5
)
differentIntOrString
:=
intstr
.
FromInt
(
5
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
period
:=
int64
(
v1
.
DefaultTerminationGracePeriodSeconds
)
enableServiceLinks
:=
v1
.
DefaultEnableServiceLinks
defaultTemplate
:=
v1
.
PodTemplateSpec
{
defaultTemplate
:=
v1
.
PodTemplateSpec
{
Spec
:
v1
.
PodSpec
{
Spec
:
v1
.
PodSpec
{
DNSPolicy
:
v1
.
DNSClusterFirst
,
DNSPolicy
:
v1
.
DNSClusterFirst
,
...
@@ -175,7 +171,6 @@ func TestSetDefaultDeployment(t *testing.T) {
...
@@ -175,7 +171,6 @@ func TestSetDefaultDeployment(t *testing.T) {
SecurityContext
:
&
v1
.
PodSecurityContext
{},
SecurityContext
:
&
v1
.
PodSecurityContext
{},
TerminationGracePeriodSeconds
:
&
period
,
TerminationGracePeriodSeconds
:
&
period
,
SchedulerName
:
api
.
DefaultSchedulerName
,
SchedulerName
:
api
.
DefaultSchedulerName
,
EnableServiceLinks
:
&
enableServiceLinks
,
},
},
}
}
tests
:=
[]
struct
{
tests
:=
[]
struct
{
...
...
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