kubelet: Make service environment variables optional
This commit is contained in:
@@ -24,22 +24,26 @@ import (
|
||||
// DeepEqualSafePodSpec returns a PodSpec which is ready to be used with apiequality.Semantic.DeepEqual
|
||||
func DeepEqualSafePodSpec() api.PodSpec {
|
||||
grace := int64(30)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
return api.PodSpec{
|
||||
RestartPolicy: api.RestartPolicyAlways,
|
||||
DNSPolicy: api.DNSClusterFirst,
|
||||
TerminationGracePeriodSeconds: &grace,
|
||||
SecurityContext: &api.PodSecurityContext{},
|
||||
SchedulerName: api.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
}
|
||||
}
|
||||
|
||||
// V1DeepEqualSafePodSpec returns a PodSpec which is ready to be used with apiequality.Semantic.DeepEqual
|
||||
func V1DeepEqualSafePodSpec() v1.PodSpec {
|
||||
grace := int64(30)
|
||||
enableServiceLinks := api.DefaultEnableServiceLinks
|
||||
return v1.PodSpec{
|
||||
RestartPolicy: v1.RestartPolicyAlways,
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
TerminationGracePeriodSeconds: &grace,
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user