Add TerminationGracePeriodSeconds to API

Set defaulting for pod spec
This commit is contained in:
Clayton Coleman
2015-08-19 19:59:43 -04:00
parent e072f56722
commit 02dbb95447
42 changed files with 530 additions and 91 deletions

View File

@@ -151,6 +151,7 @@ func TestRoundTripTypes(t *testing.T) {
}
func TestEncode_Ptr(t *testing.T) {
grace := int64(30)
pod := &api.Pod{
ObjectMeta: api.ObjectMeta{
Labels: map[string]string{"name": "foo"},
@@ -158,6 +159,8 @@ func TestEncode_Ptr(t *testing.T) {
Spec: api.PodSpec{
RestartPolicy: api.RestartPolicyAlways,
DNSPolicy: api.DNSClusterFirst,
TerminationGracePeriodSeconds: &grace,
},
}
obj := runtime.Object(pod)