mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-01-31 17:02:52 +08:00
Merge pull request #76888 from mrkm4ntr/using-with-kind
Create GroupVersionKind with simpler way Kubernetes-commit: fbc60b29333abc92859bcc01a164fa956a2a2835
This commit is contained in:
commit
22e77cb295
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -212,7 +212,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api",
|
||||
"Rev": "e8c4fd2c9be3"
|
||||
"Rev": "7fd04442e4f5"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery",
|
||||
|
@ -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{
|
||||
|
4
go.mod
4
go.mod
@ -5,7 +5,7 @@ module k8s.io/sample-controller
|
||||
go 1.12
|
||||
|
||||
require (
|
||||
k8s.io/api v0.0.0-20190424052528-e8c4fd2c9be3
|
||||
k8s.io/api v0.0.0-20190424052529-7fd04442e4f5
|
||||
k8s.io/apimachinery v0.0.0-20190424052434-11f1676e3da4
|
||||
k8s.io/client-go v0.0.0-20190424052710-157c3d454138
|
||||
k8s.io/code-generator v0.0.0-20190419212335-ff26e7842f9d
|
||||
@ -16,7 +16,7 @@ replace (
|
||||
golang.org/x/sync => golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
|
||||
golang.org/x/sys => golang.org/x/sys v0.0.0-20190209173611-3b5209105503
|
||||
golang.org/x/tools => golang.org/x/tools v0.0.0-20190313210603-aa82965741a9
|
||||
k8s.io/api => k8s.io/api v0.0.0-20190424052528-e8c4fd2c9be3
|
||||
k8s.io/api => k8s.io/api v0.0.0-20190424052529-7fd04442e4f5
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190424052434-11f1676e3da4
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20190424052710-157c3d454138
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20190419212335-ff26e7842f9d
|
||||
|
2
go.sum
2
go.sum
@ -92,7 +92,7 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
k8s.io/api v0.0.0-20190424052528-e8c4fd2c9be3/go.mod h1:D0FNL9U5fkHG3etktHaPUQJ6aC5Lz84y063tgJXlQOA=
|
||||
k8s.io/api v0.0.0-20190424052529-7fd04442e4f5/go.mod h1:D0FNL9U5fkHG3etktHaPUQJ6aC5Lz84y063tgJXlQOA=
|
||||
k8s.io/apimachinery v0.0.0-20190424052434-11f1676e3da4/go.mod h1:5CBnzrKYGHzv9ZsSKmQ8wHt4XI4/TUBPDwYM9FlZMyw=
|
||||
k8s.io/client-go v0.0.0-20190424052710-157c3d454138/go.mod h1:ps3T260wp5Qny8Oa4/uRYRUuLvt5F/9CFAUry2GY1FY=
|
||||
k8s.io/code-generator v0.0.0-20190419212335-ff26e7842f9d/go.mod h1:rVrFWfTVftGH7bb972nWC6N4QkJ4LU7FOXu8GH2UkJo=
|
||||
|
Loading…
Reference in New Issue
Block a user