Add resource exists error on spec validate (#1506)

Co-authored-by: Anubhav <50611570+anubhav6663@users.noreply.github.com>
This commit is contained in:
Ta-Ching Chen
2020-01-27 19:09:35 +08:00
committed by GitHub
co-authored by Anubhav
parent 520cc0e130
commit 1e8148c051
5 changed files with 171 additions and 39 deletions
+8
View File
@@ -19,6 +19,7 @@ package v1
import (
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
)
//
@@ -675,4 +676,11 @@ type (
CanaryConfigStatus struct {
Status string `json:"status"`
}
// MetadataAccessor lets you work with object metadata and type metadata
// from any of the versioned or internal API objects.
MetadataAccessor interface {
GetObjectKind() schema.ObjectKind
GetObjectMeta() metav1.Object
}
)