copy TypeMeta from apimachinery

This commit is contained in:
Jingfang Liu
2018-10-09 15:27:07 -07:00
parent 0faef46773
commit f7353b1295

View File

@@ -18,14 +18,21 @@ limitations under the License.
package types package types
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/kustomize/pkg/patch" "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. // Kustomization holds the information needed to generate customized k8s api resources.
type Kustomization struct { 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 // NamePrefix will prefix the names of all resources mentioned in the kustomization
// file including generated configmaps and secrets. // file including generated configmaps and secrets.