pkg/api, pkg/apis: Copied constants to versioned types.go, copied several util funcs to versioned
This commit is contained in:
@@ -18,6 +18,7 @@ package testing
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
)
|
||||
|
||||
// DeepEqualSafePodSpec returns a PodSpec which is ready to be used with api.Semantic.DeepEqual
|
||||
@@ -30,3 +31,14 @@ func DeepEqualSafePodSpec() api.PodSpec {
|
||||
SecurityContext: &api.PodSecurityContext{},
|
||||
}
|
||||
}
|
||||
|
||||
// V1DeepEqualSafePodSpec returns a PodSpec which is ready to be used with api.Semantic.DeepEqual
|
||||
func V1DeepEqualSafePodSpec() v1.PodSpec {
|
||||
grace := int64(30)
|
||||
return v1.PodSpec{
|
||||
RestartPolicy: v1.RestartPolicyAlways,
|
||||
DNSPolicy: v1.DNSClusterFirst,
|
||||
TerminationGracePeriodSeconds: &grace,
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user