diff --git a/api/v1/groupversion_info.go b/api/v1/groupversion_info.go index af76991754..0bd23f33b4 100644 --- a/api/v1/groupversion_info.go +++ b/api/v1/groupversion_info.go @@ -44,6 +44,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &OCSInitialization{}, &OCSInitializationList{}, &StorageCluster{}, &StorageClusterList{}, &StorageProfile{}, &StorageProfileList{}, + &StorageClusterPeer{}, &StorageClusterPeerList{}, ) metav1.AddToGroupVersion(scheme, GroupVersion) return nil diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 81046618e3..4f6b38fa8e 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -767,6 +767,95 @@ func (in *StorageClusterList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClusterPeer) DeepCopyInto(out *StorageClusterPeer) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClusterPeer. +func (in *StorageClusterPeer) DeepCopy() *StorageClusterPeer { + if in == nil { + return nil + } + out := new(StorageClusterPeer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageClusterPeer) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClusterPeerList) DeepCopyInto(out *StorageClusterPeerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageClusterPeer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClusterPeerList. +func (in *StorageClusterPeerList) DeepCopy() *StorageClusterPeerList { + if in == nil { + return nil + } + out := new(StorageClusterPeerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageClusterPeerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClusterPeerSpec) DeepCopyInto(out *StorageClusterPeerSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClusterPeerSpec. +func (in *StorageClusterPeerSpec) DeepCopy() *StorageClusterPeerSpec { + if in == nil { + return nil + } + out := new(StorageClusterPeerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClusterPeerStatus) DeepCopyInto(out *StorageClusterPeerStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClusterPeerStatus. +func (in *StorageClusterPeerStatus) DeepCopy() *StorageClusterPeerStatus { + if in == nil { + return nil + } + out := new(StorageClusterPeerStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageClusterSpec) DeepCopyInto(out *StorageClusterSpec) { *out = *in diff --git a/config/crd/bases/ocs.openshift.io_storageclusterpeers.yaml b/config/crd/bases/ocs.openshift.io_storageclusterpeers.yaml new file mode 100644 index 0000000000..576e0b1eb1 --- /dev/null +++ b/config/crd/bases/ocs.openshift.io_storageclusterpeers.yaml @@ -0,0 +1,63 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: storageclusterpeers.ocs.openshift.io +spec: + group: ocs.openshift.io + names: + kind: StorageClusterPeer + listKind: StorageClusterPeerList + plural: storageclusterpeers + singular: storageclusterpeer + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Current Phase + jsonPath: .status.phase + name: Phase + type: string + name: v1 + schema: + openAPIV3Schema: + description: StorageClusterPeer is the Schema for the storageclusterpeers + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: StorageClusterPeerSpec defines the desired state of StorageClusterPeer + properties: + ocsApiServerUri: + description: OCSAPIServerURI is the URI of the secondary ocs api server + type: string + type: object + status: + description: StorageClusterPeerStatus defines the observed state of StorageClusterPeer + properties: + phase: + description: Phase describes the Phase of StorageClusterPeer This + is used by OLM UI to provide status information to the user + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/manifests/ocs-operator/bases/ocs-operator.clusterserviceversion.yaml b/config/manifests/ocs-operator/bases/ocs-operator.clusterserviceversion.yaml index bb88ade1d7..f4c54b69c9 100644 --- a/config/manifests/ocs-operator/bases/ocs-operator.clusterserviceversion.yaml +++ b/config/manifests/ocs-operator/bases/ocs-operator.clusterserviceversion.yaml @@ -27,6 +27,11 @@ spec: kind: StorageClassRequest name: storageclassrequests.ocs.openshift.io version: v1alpha1 + - description: StorageClusterPeer is the Schema for the storageclusterpeers API + displayName: Storage Cluster Peer + kind: StorageClusterPeer + name: storageclusterpeers.ocs.openshift.io + version: v1 - description: StorageCluster represents a cluster including Ceph Cluster, NooBaa and all the storage and compute resources required. displayName: Storage Cluster diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index a322815201..1de9c0bd2a 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -233,6 +233,32 @@ rules: - get - patch - update +- apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers/finalizers + verbs: + - update +- apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers/status + verbs: + - get + - patch + - update - apiGroups: - ocs.openshift.io resources: diff --git a/controllers/suite_test.go b/controllers/suite_test.go deleted file mode 100644 index 651acfa12c..0000000000 --- a/controllers/suite_test.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2020 Red Hat OpenShift Container Storage. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controllers - -import ( - "path/filepath" - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/log/zap" - - ocsv1 "github.com/red-hat-storage/ocs-operator/api/v4/v1" - //+kubebuilder:scaffold:imports -) - -// These tests use Ginkgo (BDD-style Go testing framework). Refer to -// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. - -var cfg *rest.Config -var k8sClient client.Client -var testEnv *envtest.Environment - -func TestAPIs(t *testing.T) { - RegisterFailHandler(Fail) - - RunSpecs(t, "Controller Suite") -} - -var _ = BeforeSuite(func() { - logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) - - By("bootstrapping test environment") - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, - ErrorIfCRDPathMissing: true, - } - - var err error - // cfg is defined in this file globally. - cfg, err = testEnv.Start() - Expect(err).NotTo(HaveOccurred()) - Expect(cfg).NotTo(BeNil()) - - err = ocsv1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - - //+kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) - Expect(err).NotTo(HaveOccurred()) - Expect(k8sClient).NotTo(BeNil()) - -}) - -var _ = AfterSuite(func() { - By("tearing down the test environment") - err := testEnv.Stop() - Expect(err).NotTo(HaveOccurred()) -}) diff --git a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusterpeers.yaml b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusterpeers.yaml new file mode 100644 index 0000000000..576e0b1eb1 --- /dev/null +++ b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusterpeers.yaml @@ -0,0 +1,63 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: storageclusterpeers.ocs.openshift.io +spec: + group: ocs.openshift.io + names: + kind: StorageClusterPeer + listKind: StorageClusterPeerList + plural: storageclusterpeers + singular: storageclusterpeer + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Current Phase + jsonPath: .status.phase + name: Phase + type: string + name: v1 + schema: + openAPIV3Schema: + description: StorageClusterPeer is the Schema for the storageclusterpeers + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: StorageClusterPeerSpec defines the desired state of StorageClusterPeer + properties: + ocsApiServerUri: + description: OCSAPIServerURI is the URI of the secondary ocs api server + type: string + type: object + status: + description: StorageClusterPeerStatus defines the observed state of StorageClusterPeer + properties: + phase: + description: Phase describes the Phase of StorageClusterPeer This + is used by OLM UI to provide status information to the user + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/deploy/csv-templates/ocs-operator.csv.yaml.in b/deploy/csv-templates/ocs-operator.csv.yaml.in index f91fe072d3..cd5353503c 100644 --- a/deploy/csv-templates/ocs-operator.csv.yaml.in +++ b/deploy/csv-templates/ocs-operator.csv.yaml.in @@ -59,6 +59,17 @@ metadata: ] } }, + { + "apiVersion": "ocs.openshift.io/v1", + "kind": "StorageClusterPeer", + "metadata": { + "labels": null, + "name": "storageclusterpeer-sample" + }, + "spec": { + "ocsApiServerUri": "10.0.0.0/31659" + } + }, { "apiVersion": "ocs.openshift.io/v1", "kind": "StorageProfile", @@ -102,6 +113,11 @@ spec: kind: StorageClassRequest name: storageclassrequests.ocs.openshift.io version: v1alpha1 + - description: StorageClusterPeer is the Schema for the storageclusterpeers API + displayName: Storage Cluster Peer + kind: StorageClusterPeer + name: storageclusterpeers.ocs.openshift.io + version: v1 - description: StorageCluster represents a cluster including Ceph Cluster, NooBaa and all the storage and compute resources required. displayName: Storage Cluster @@ -387,6 +403,32 @@ spec: - get - patch - update + - apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers/finalizers + verbs: + - update + - apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers/status + verbs: + - get + - patch + - update - apiGroups: - ocs.openshift.io resources: diff --git a/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml b/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml index 5d41cf9c64..5042a403b3 100644 --- a/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml +++ b/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml @@ -1662,7 +1662,7 @@ metadata: operatorframework.io/suggested-namespace: openshift-storage operators.openshift.io/infrastructure-features: '["disconnected"]' operators.operatorframework.io/builder: operator-sdk-v1.25.4 - operators.operatorframework.io/internal-objects: '["ocsinitializations.ocs.openshift.io","storageclassrequests.ocs.openshift.io","storageconsumers.ocs.openshift.io","storageprofiles.ocs.openshift.io","cephclusters.ceph.rook.io","cephobjectstores.ceph.rook.io","cephobjectstoreusers.ceph.rook.io","cephnfses.ceph.rook.io","cephclients.ceph.rook.io","cephfilesystems.ceph.rook.io","cephfilesystemmirrors.ceph.rook.io","cephrbdmirrors.ceph.rook.io","cephobjectrealms.ceph.rook.io","cephobjectzonegroups.ceph.rook.io","cephobjectzones.ceph.rook.io","cephbucketnotifications.ceph.rook.io","cephbuckettopics.ceph.rook.io","cephfilesystemsubvolumegroups.ceph.rook.io","cephblockpoolradosnamespaces.ceph.rook.io","cephcosidrivers.ceph.rook.io"]' + operators.operatorframework.io/internal-objects: '["ocsinitializations.ocs.openshift.io","storageclassrequests.ocs.openshift.io","storageclusterpeers.ocs.openshift.io","storageconsumers.ocs.openshift.io","storageprofiles.ocs.openshift.io","cephclusters.ceph.rook.io","cephobjectstores.ceph.rook.io","cephobjectstoreusers.ceph.rook.io","cephnfses.ceph.rook.io","cephclients.ceph.rook.io","cephfilesystems.ceph.rook.io","cephfilesystemmirrors.ceph.rook.io","cephrbdmirrors.ceph.rook.io","cephobjectrealms.ceph.rook.io","cephobjectzonegroups.ceph.rook.io","cephobjectzones.ceph.rook.io","cephbucketnotifications.ceph.rook.io","cephbuckettopics.ceph.rook.io","cephfilesystemsubvolumegroups.ceph.rook.io","cephblockpoolradosnamespaces.ceph.rook.io","cephcosidrivers.ceph.rook.io"]' operators.operatorframework.io/operator-type: non-standalone operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/red-hat-storage/ocs-operator @@ -1691,6 +1691,11 @@ spec: kind: StorageClassRequest name: storageclassrequests.ocs.openshift.io version: v1alpha1 + - description: StorageClusterPeer is the Schema for the storageclusterpeers API + displayName: Storage Cluster Peer + kind: StorageClusterPeer + name: storageclusterpeers.ocs.openshift.io + version: v1 - description: StorageCluster represents a cluster including Ceph Cluster, NooBaa and all the storage and compute resources required. displayName: Storage Cluster @@ -2152,6 +2157,32 @@ spec: - get - patch - update + - apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers/finalizers + verbs: + - update + - apiGroups: + - ocs.openshift.io + resources: + - storageclusterpeers/status + verbs: + - get + - patch + - update - apiGroups: - ocs.openshift.io resources: diff --git a/deploy/ocs-operator/manifests/storageclusterpeer.crd.yaml b/deploy/ocs-operator/manifests/storageclusterpeer.crd.yaml new file mode 100644 index 0000000000..2a42669e0a --- /dev/null +++ b/deploy/ocs-operator/manifests/storageclusterpeer.crd.yaml @@ -0,0 +1,62 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + name: storageclusterpeers.ocs.openshift.io +spec: + group: ocs.openshift.io + names: + kind: StorageClusterPeer + listKind: StorageClusterPeerList + plural: storageclusterpeers + singular: storageclusterpeer + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Current Phase + jsonPath: .status.phase + name: Phase + type: string + name: v1 + schema: + openAPIV3Schema: + description: StorageClusterPeer is the Schema for the storageclusterpeers + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: StorageClusterPeerSpec defines the desired state of StorageClusterPeer + properties: + ocsApiServerUri: + description: OCSAPIServerURI is the URI of the secondary ocs api server + type: string + type: object + status: + description: StorageClusterPeerStatus defines the observed state of StorageClusterPeer + properties: + phase: + description: Phase describes the Phase of StorageClusterPeer This + is used by OLM UI to provide status information to the user + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/groupversion_info.go b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/groupversion_info.go index af76991754..0bd23f33b4 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/groupversion_info.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/groupversion_info.go @@ -44,6 +44,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &OCSInitialization{}, &OCSInitializationList{}, &StorageCluster{}, &StorageClusterList{}, &StorageProfile{}, &StorageProfileList{}, + &StorageClusterPeer{}, &StorageClusterPeerList{}, ) metav1.AddToGroupVersion(scheme, GroupVersion) return nil diff --git a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storageclusterpeer_types.go b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storageclusterpeer_types.go new file mode 100644 index 0000000000..3adeea49a3 --- /dev/null +++ b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/storageclusterpeer_types.go @@ -0,0 +1,84 @@ +/* +Copyright 2020 Red Hat OpenShift Container Storage. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +type StorageClusterPeerState string + +const ( + // StorageClusterPeerInitializing represents Initializing state of StorageClusterPeerState + StorageClusterPeerInitializing StorageClusterPeerState = "Initializing" + // StorageClusterPeerValidating represents Validating state of StorageClusterPeerState + StorageClusterPeerValidating StorageClusterPeerState = "Validating" + // StorageClusterPeerFailed represents Failed state of StorageClusterPeerState + StorageClusterPeerFailed StorageClusterPeerState = "Failed" + // StorageClusterPeerCreating represents Configuring state of StorageClusterPeerState + StorageClusterPeerCreating StorageClusterPeerState = "Creating" + // StorageClusterPeerConfiguring represents Configuring state of StorageClusterPeerState + StorageClusterPeerConfiguring StorageClusterPeerState = "Configuring" + // StorageClusterPeerReady represents Ready state of StorageClusterPeerState + StorageClusterPeerReady StorageClusterPeerState = "Ready" + // StorageClusterPeerDeleting represents Deleting state of StorageClusterPeerState + StorageClusterPeerDeleting StorageClusterPeerState = "Deleting" +) + +// StorageClusterPeerSpec defines the desired state of StorageClusterPeer +type StorageClusterPeerSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // OCSAPIServerURI is the URI of the secondary ocs api server + OCSAPIServerURI string `json:"ocsApiServerUri,omitempty"` +} + +// StorageClusterPeerStatus defines the observed state of StorageClusterPeer +type StorageClusterPeerStatus struct { + + // Phase describes the Phase of StorageClusterPeer + // This is used by OLM UI to provide status information to the user + Phase StorageClusterPeerState `json:"phase,omitempty"` +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=.metadata.creationTimestamp +// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=.status.phase,description="Current Phase" +// +operator-sdk:csv:customresourcedefinitions:displayName="Storage Cluster Peer" + +// StorageClusterPeer is the Schema for the storageclusterpeers API +type StorageClusterPeer struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec StorageClusterPeerSpec `json:"spec,omitempty"` + Status StorageClusterPeerStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// StorageClusterPeerList contains a list of StorageClusterPeer +type StorageClusterPeerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageClusterPeer `json:"items"` +} diff --git a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go index 81046618e3..4f6b38fa8e 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go @@ -767,6 +767,95 @@ func (in *StorageClusterList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClusterPeer) DeepCopyInto(out *StorageClusterPeer) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClusterPeer. +func (in *StorageClusterPeer) DeepCopy() *StorageClusterPeer { + if in == nil { + return nil + } + out := new(StorageClusterPeer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageClusterPeer) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClusterPeerList) DeepCopyInto(out *StorageClusterPeerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageClusterPeer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClusterPeerList. +func (in *StorageClusterPeerList) DeepCopy() *StorageClusterPeerList { + if in == nil { + return nil + } + out := new(StorageClusterPeerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageClusterPeerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClusterPeerSpec) DeepCopyInto(out *StorageClusterPeerSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClusterPeerSpec. +func (in *StorageClusterPeerSpec) DeepCopy() *StorageClusterPeerSpec { + if in == nil { + return nil + } + out := new(StorageClusterPeerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClusterPeerStatus) DeepCopyInto(out *StorageClusterPeerStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClusterPeerStatus. +func (in *StorageClusterPeerStatus) DeepCopy() *StorageClusterPeerStatus { + if in == nil { + return nil + } + out := new(StorageClusterPeerStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageClusterSpec) DeepCopyInto(out *StorageClusterSpec) { *out = *in