kubelet: Make service environment variables optional
This commit is contained in:
@@ -39,6 +39,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
defaultLabels := map[string]string{"foo": "bar"}
|
||||
maxUnavailable := intstr.FromInt(1)
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -46,6 +47,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: defaultLabels,
|
||||
@@ -58,6 +60,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
}
|
||||
tests := []struct {
|
||||
@@ -175,6 +178,7 @@ func TestSetDefaultStatefulSet(t *testing.T) {
|
||||
var defaultReplicas int32 = 1
|
||||
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -182,6 +186,7 @@ func TestSetDefaultStatefulSet(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: defaultLabels,
|
||||
@@ -286,6 +291,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
defaultIntOrString := intstr.FromString("25%")
|
||||
differentIntOrString := intstr.FromInt(5)
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -293,6 +299,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
}
|
||||
tests := []struct {
|
||||
|
||||
@@ -38,6 +38,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
defaultIntOrString := intstr.FromString("25%")
|
||||
differentIntOrString := intstr.FromInt(5)
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -45,6 +46,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
}
|
||||
tests := []struct {
|
||||
|
||||
@@ -39,6 +39,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
defaultLabels := map[string]string{"foo": "bar"}
|
||||
maxUnavailable := intstr.FromInt(1)
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -46,6 +47,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: defaultLabels,
|
||||
@@ -58,6 +60,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
}
|
||||
tests := []struct {
|
||||
@@ -175,6 +178,7 @@ func TestSetDefaultStatefulSet(t *testing.T) {
|
||||
var defaultReplicas int32 = 1
|
||||
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -182,6 +186,7 @@ func TestSetDefaultStatefulSet(t *testing.T) {
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
TerminationGracePeriodSeconds: &period,
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Labels: defaultLabels,
|
||||
@@ -286,6 +291,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
defaultIntOrString := intstr.FromString("25%")
|
||||
differentIntOrString := intstr.FromInt(5)
|
||||
period := int64(v1.DefaultTerminationGracePeriodSeconds)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
defaultTemplate := v1.PodTemplateSpec{
|
||||
Spec: v1.PodSpec{
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
@@ -293,6 +299,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