kubelet: Make service environment variables optional
This commit is contained in:
@@ -40,6 +40,7 @@ import (
|
||||
func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
defaultLabels := map[string]string{"foo": "bar"}
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -47,6 +48,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: defaultLabels,
|
||||
@@ -59,6 +61,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
}
|
||||
tests := []struct {
|
||||
@@ -164,6 +167,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
defaultIntOrString := intstr.FromInt(1)
|
||||
differentIntOrString := intstr.FromInt(5)
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -171,6 +175,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
}
|
||||
tests := []struct {
|
||||
|
Reference in New Issue
Block a user