From f7353b12958a84bb894d93801c8b063bb0f10901 Mon Sep 17 00:00:00 2001 From: Jingfang Liu Date: Tue, 9 Oct 2018 15:27:07 -0700 Subject: [PATCH] copy TypeMeta from apimachinery --- pkg/types/kustomization.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg/types/kustomization.go b/pkg/types/kustomization.go index 1aa35540e..c1b4a0395 100644 --- a/pkg/types/kustomization.go +++ b/pkg/types/kustomization.go @@ -18,14 +18,21 @@ limitations under the License. package types import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/kustomize/pkg/patch" ) +// TypeMeta copies apimachinery/pkg/apis/meta/v1.TypeMeta +type TypeMeta struct { + // Kind copies apimachinery/pkg/apis/meta/v1.Typemeta.Kind + Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` + + // APIVersion copies apimachinery/pkg/apis/meta/v1.Typemeta.APIVersion + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` +} + // Kustomization holds the information needed to generate customized k8s api resources. type Kustomization struct { - metav1.TypeMeta `json:",inline" yaml:",inline"` + TypeMeta `json:",inline" yaml:",inline"` // NamePrefix will prefix the names of all resources mentioned in the kustomization // file including generated configmaps and secrets.