udpate some examples to use external types
This commit is contained in:
@@ -257,6 +257,7 @@ func (f *ring0Factory) UpdatePodSpecForObject(obj runtime.Object, fn func(*v1.Po
|
||||
t.Spec.Template = &v1.PodTemplateSpec{}
|
||||
}
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
|
||||
// Deployment
|
||||
case *extensionsv1beta1.Deployment:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
@@ -266,6 +267,7 @@ func (f *ring0Factory) UpdatePodSpecForObject(obj runtime.Object, fn func(*v1.Po
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
case *appsv1.Deployment:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
|
||||
// DaemonSet
|
||||
case *extensionsv1beta1.DaemonSet:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
@@ -273,6 +275,7 @@ func (f *ring0Factory) UpdatePodSpecForObject(obj runtime.Object, fn func(*v1.Po
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
case *appsv1.DaemonSet:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
|
||||
// ReplicaSet
|
||||
case *extensionsv1beta1.ReplicaSet:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
@@ -280,6 +283,7 @@ func (f *ring0Factory) UpdatePodSpecForObject(obj runtime.Object, fn func(*v1.Po
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
case *appsv1.ReplicaSet:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
|
||||
// StatefulSet
|
||||
case *appsv1beta1.StatefulSet:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
@@ -287,14 +291,17 @@ func (f *ring0Factory) UpdatePodSpecForObject(obj runtime.Object, fn func(*v1.Po
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
case *appsv1.StatefulSet:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
|
||||
// Job
|
||||
case *batchv1.Job:
|
||||
return true, fn(&t.Spec.Template.Spec)
|
||||
|
||||
// CronJob
|
||||
case *batchv1beta1.CronJob:
|
||||
return true, fn(&t.Spec.JobTemplate.Spec.Template.Spec)
|
||||
case *batchv2alpha1.CronJob:
|
||||
return true, fn(&t.Spec.JobTemplate.Spec.Template.Spec)
|
||||
|
||||
default:
|
||||
return false, fmt.Errorf("the object is not a pod or does not have a pod template")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user