diff --git a/go.mod b/go.mod index 25b5d58ed..a3b7648e5 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/go-bindata/go-bindata v3.1.2+incompatible github.com/onsi/ginkgo v1.11.0 github.com/onsi/gomega v1.8.1 - github.com/open-cluster-management/api v0.0.0-20200610161514-939cead3902c + github.com/open-cluster-management/api v0.0.0-20200629211334-8be047b65c52 github.com/openshift/api v0.0.0-20200521101457-60c476765272 github.com/openshift/build-machinery-go v0.0.0-20200424080330-082bf86082cc github.com/openshift/library-go v0.0.0-20200617154932-eaf8c138def4 diff --git a/go.sum b/go.sum index 97038d736..9424135e2 100644 --- a/go.sum +++ b/go.sum @@ -310,8 +310,8 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/open-cluster-management/api v0.0.0-20200610161514-939cead3902c h1:UY7VEmlpib52/tI6lP60c21cGGSNJbX1terjoWOhJ0M= -github.com/open-cluster-management/api v0.0.0-20200610161514-939cead3902c/go.mod h1:+vUECYB7WkfCb52r0J7rxgD1mseSGAqGi8rTLLRcbgw= +github.com/open-cluster-management/api v0.0.0-20200629211334-8be047b65c52 h1:8+Qh4L7ijoYK0wKM3Whjge53IVhL2fVWRbuUjy5kMUM= +github.com/open-cluster-management/api v0.0.0-20200629211334-8be047b65c52/go.mod h1:+vUECYB7WkfCb52r0J7rxgD1mseSGAqGi8rTLLRcbgw= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= diff --git a/manifests/cluster-manager/0000_00_clusters.open-cluster-management.io_managedclusters.crd.yaml b/manifests/cluster-manager/0000_00_clusters.open-cluster-management.io_managedclusters.crd.yaml index befc50b2a..1a39ed84b 100644 --- a/manifests/cluster-manager/0000_00_clusters.open-cluster-management.io_managedclusters.crd.yaml +++ b/manifests/cluster-manager/0000_00_clusters.open-cluster-management.io_managedclusters.crd.yaml @@ -3,13 +3,29 @@ kind: CustomResourceDefinition metadata: name: managedclusters.cluster.open-cluster-management.io spec: + additionalPrinterColumns: + - JSONPath: .spec.hubAcceptsClient + name: Hub Accepted + type: boolean + - JSONPath: .spec.managedClusterClientConfigs[*].url + name: Managed Cluster URLs + type: string + - JSONPath: .status.conditions[?(@.type=="ManagedClusterJoined")].status + name: Joined + type: string + - JSONPath: .status.conditions[?(@.type=="ManagedClusterConditionAvailable")].status + name: Available + type: string + - JSONPath: .metadata.creationTimestamp + name: Age + type: date group: cluster.open-cluster-management.io names: kind: ManagedCluster listKind: ManagedClusterList plural: managedclusters singular: managedcluster - scope: "Cluster" + scope: Cluster subresources: status: {} preserveUnknownFields: false diff --git a/manifests/cluster-manager/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml b/manifests/cluster-manager/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml index 133c5cc81..06bbc7748 100644 --- a/manifests/cluster-manager/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml +++ b/manifests/cluster-manager/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml @@ -89,6 +89,12 @@ spec: resource: description: Resource is the resource name of the kubernetes resource type: string + uid: + description: UID is set on successful deletion of the kubernetes + resource by controller. The resource might be still visible + on the managed cluster after this field is set. It is not directly + settable by a client. + type: string version: description: Version is the version of the kubernetes resource type: string diff --git a/pkg/operators/clustermanager/bindata/bindata.go b/pkg/operators/clustermanager/bindata/bindata.go index b290fe636..4e59be24b 100644 --- a/pkg/operators/clustermanager/bindata/bindata.go +++ b/pkg/operators/clustermanager/bindata/bindata.go @@ -74,13 +74,29 @@ kind: CustomResourceDefinition metadata: name: managedclusters.cluster.open-cluster-management.io spec: + additionalPrinterColumns: + - JSONPath: .spec.hubAcceptsClient + name: Hub Accepted + type: boolean + - JSONPath: .spec.managedClusterClientConfigs[*].url + name: Managed Cluster URLs + type: string + - JSONPath: .status.conditions[?(@.type=="ManagedClusterJoined")].status + name: Joined + type: string + - JSONPath: .status.conditions[?(@.type=="ManagedClusterConditionAvailable")].status + name: Available + type: string + - JSONPath: .metadata.creationTimestamp + name: Age + type: date group: cluster.open-cluster-management.io names: kind: ManagedCluster listKind: ManagedClusterList plural: managedclusters singular: managedcluster - scope: "Cluster" + scope: Cluster subresources: status: {} preserveUnknownFields: false @@ -325,6 +341,12 @@ spec: resource: description: Resource is the resource name of the kubernetes resource type: string + uid: + description: UID is set on successful deletion of the kubernetes + resource by controller. The resource might be still visible + on the managed cluster after this field is set. It is not directly + settable by a client. + type: string version: description: Version is the version of the kubernetes resource type: string diff --git a/vendor/github.com/open-cluster-management/api/cluster/v1/0000_00_clusters.open-cluster-management.io_managedclusters.crd.yaml b/vendor/github.com/open-cluster-management/api/cluster/v1/0000_00_clusters.open-cluster-management.io_managedclusters.crd.yaml index befc50b2a..1a39ed84b 100644 --- a/vendor/github.com/open-cluster-management/api/cluster/v1/0000_00_clusters.open-cluster-management.io_managedclusters.crd.yaml +++ b/vendor/github.com/open-cluster-management/api/cluster/v1/0000_00_clusters.open-cluster-management.io_managedclusters.crd.yaml @@ -3,13 +3,29 @@ kind: CustomResourceDefinition metadata: name: managedclusters.cluster.open-cluster-management.io spec: + additionalPrinterColumns: + - JSONPath: .spec.hubAcceptsClient + name: Hub Accepted + type: boolean + - JSONPath: .spec.managedClusterClientConfigs[*].url + name: Managed Cluster URLs + type: string + - JSONPath: .status.conditions[?(@.type=="ManagedClusterJoined")].status + name: Joined + type: string + - JSONPath: .status.conditions[?(@.type=="ManagedClusterConditionAvailable")].status + name: Available + type: string + - JSONPath: .metadata.creationTimestamp + name: Age + type: date group: cluster.open-cluster-management.io names: kind: ManagedCluster listKind: ManagedClusterList plural: managedclusters singular: managedcluster - scope: "Cluster" + scope: Cluster subresources: status: {} preserveUnknownFields: false diff --git a/vendor/github.com/open-cluster-management/api/cluster/v1/types.go b/vendor/github.com/open-cluster-management/api/cluster/v1/types.go index f15cb3aa8..f3b02c8c3 100644 --- a/vendor/github.com/open-cluster-management/api/cluster/v1/types.go +++ b/vendor/github.com/open-cluster-management/api/cluster/v1/types.go @@ -8,6 +8,13 @@ import ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope="Cluster" +// +kubebuilder:printcolumn:JSONPath=`.spec.hubAcceptsClient`,name="Hub Accepted",type=boolean +// +kubebuilder:printcolumn:JSONPath=`.spec.managedClusterClientConfigs[*].url`,name="Managed Cluster URLs",type=string +// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="ManagedClusterJoined")].status`,name="Joined",type=string +// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="ManagedClusterConditionAvailable")].status`,name="Available",type=string +// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date // ManagedCluster represents the desired state and current status of managed // cluster. ManagedCluster is a cluster scoped resource. The name is the cluster diff --git a/vendor/github.com/open-cluster-management/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml b/vendor/github.com/open-cluster-management/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml index 133c5cc81..06bbc7748 100644 --- a/vendor/github.com/open-cluster-management/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml +++ b/vendor/github.com/open-cluster-management/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml @@ -89,6 +89,12 @@ spec: resource: description: Resource is the resource name of the kubernetes resource type: string + uid: + description: UID is set on successful deletion of the kubernetes + resource by controller. The resource might be still visible + on the managed cluster after this field is set. It is not directly + settable by a client. + type: string version: description: Version is the version of the kubernetes resource type: string diff --git a/vendor/github.com/open-cluster-management/api/work/v1/types.go b/vendor/github.com/open-cluster-management/api/work/v1/types.go index a5a1a310e..13bebcc81 100644 --- a/vendor/github.com/open-cluster-management/api/work/v1/types.go +++ b/vendor/github.com/open-cluster-management/api/work/v1/types.go @@ -123,6 +123,12 @@ type AppliedManifestResourceMeta struct { // it is a cluster scoped resource. // +required Namespace string `json:"namespace"` + + // UID is set on successful deletion of the kubernetes resource by controller. The + // resource might be still visible on the managed cluster after this field is set. + // It is not directly settable by a client. + // +optional + UID string `json:"uid,omitempty"` } // ManifestWorkStatus represents the current status of managed cluster ManifestWork diff --git a/vendor/github.com/open-cluster-management/api/work/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/open-cluster-management/api/work/v1/zz_generated.swagger_doc_generated.go index 122543b93..5baf7f6b9 100644 --- a/vendor/github.com/open-cluster-management/api/work/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/open-cluster-management/api/work/v1/zz_generated.swagger_doc_generated.go @@ -18,6 +18,7 @@ var map_AppliedManifestResourceMeta = map[string]string{ "resource": "Resource is the resource name of the kubernetes resource", "name": "Name is the name of the kubernetes resource", "namespace": "Name is the namespace of the kubernetes resource, empty string indicates it is a cluster scoped resource.", + "uid": "UID is set on successful deletion of the kubernetes resource by controller. The resource might be still visible on the managed cluster after this field is set. It is not directly settable by a client.", } func (AppliedManifestResourceMeta) SwaggerDoc() map[string]string { diff --git a/vendor/modules.txt b/vendor/modules.txt index f9329ac78..5d4d34604 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -133,7 +133,7 @@ github.com/onsi/gomega/matchers/support/goraph/edge github.com/onsi/gomega/matchers/support/goraph/node github.com/onsi/gomega/matchers/support/goraph/util github.com/onsi/gomega/types -# github.com/open-cluster-management/api v0.0.0-20200610161514-939cead3902c +# github.com/open-cluster-management/api v0.0.0-20200629211334-8be047b65c52 github.com/open-cluster-management/api/client/operator/clientset/versioned github.com/open-cluster-management/api/client/operator/clientset/versioned/fake github.com/open-cluster-management/api/client/operator/clientset/versioned/scheme