mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-01-31 17:02:52 +08:00
Create GroupVersionKind with simpler way
Kubernetes-commit: e9906dc36246889478db999b5b44c2df48176100
This commit is contained in:
parent
db05ffadea
commit
e3d37f6957
@ -24,7 +24,6 @@ import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
appsinformers "k8s.io/client-go/informers/apps/v1"
|
||||
@ -398,11 +397,7 @@ func newDeployment(foo *samplev1alpha1.Foo) *appsv1.Deployment {
|
||||
Name: foo.Spec.DeploymentName,
|
||||
Namespace: foo.Namespace,
|
||||
OwnerReferences: []metav1.OwnerReference{
|
||||
*metav1.NewControllerRef(foo, schema.GroupVersionKind{
|
||||
Group: samplev1alpha1.SchemeGroupVersion.Group,
|
||||
Version: samplev1alpha1.SchemeGroupVersion.Version,
|
||||
Kind: "Foo",
|
||||
}),
|
||||
*metav1.NewControllerRef(foo, samplev1alpha1.SchemeGroupVersion.WithKind("Foo")),
|
||||
},
|
||||
},
|
||||
Spec: appsv1.DeploymentSpec{
|
||||
|
Loading…
Reference in New Issue
Block a user