diff --git a/go.sum b/go.sum index 21b7fdee0c..8f811354c5 100644 --- a/go.sum +++ b/go.sum @@ -822,6 +822,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/red-hat-storage/ocs-client-operator v0.0.0-20240216124345-1b9b7fb23b8d h1:s1+nZP7lJGHULtKTDo251s2i1aq13dHU/JHjnsxm/Ak= +github.com/red-hat-storage/ocs-client-operator v0.0.0-20240216124345-1b9b7fb23b8d/go.mod h1:T2nQvV/a5Qxi6PcrzN/7gBEGTx0T7xLwsZ0xxJOfvyI= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= diff --git a/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/groupversion_info.go b/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/groupversion_info.go new file mode 100644 index 0000000000..266317b68a --- /dev/null +++ b/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2022 Red Hat, Inc. + +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 v1alpha1 contains API Schema definitions for the ocs v1alpha1 API group +// +kubebuilder:object:generate=true +// +groupName=ocs.openshift.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "ocs.openshift.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/storageclassclaim_types.go b/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/storageclassclaim_types.go new file mode 100644 index 0000000000..e299d4119f --- /dev/null +++ b/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/storageclassclaim_types.go @@ -0,0 +1,93 @@ +/* +Copyright 2022 Red Hat, Inc. + +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 v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type storageClassClaimState string + +const ( + // StorageClassClaimInitializing represents Initializing state of StorageClassClaim + StorageClassClaimInitializing storageClassClaimState = "Initializing" + // StorageClassClaimValidating represents Validating state of StorageClassClaim + StorageClassClaimValidating storageClassClaimState = "Validating" + // StorageClassClaimFailed represents Failed state of StorageClassClaim + StorageClassClaimFailed storageClassClaimState = "Failed" + // StorageClassClaimCreating represents Configuring state of StorageClassClaim + StorageClassClaimCreating storageClassClaimState = "Creating" + // StorageClassClaimConfiguring represents Configuring state of StorageClassClaim + StorageClassClaimConfiguring storageClassClaimState = "Configuring" + // StorageClassClaimReady represents Ready state of StorageClassClaim + StorageClassClaimReady storageClassClaimState = "Ready" + // StorageClassClaimDeleting represents Deleting state of StorageClassClaim + StorageClassClaimDeleting storageClassClaimState = "Deleting" +) + +// StorageClassClaimStatus defines the observed state of StorageClassClaim +type StorageClassClaimStatus struct { + Phase storageClassClaimState `json:"phase,omitempty"` + SecretNames []string `json:"secretNames,omitempty"` +} + +type StorageClientNamespacedName struct { + Name string `json:"name"` + Namespace string `json:"namespace"` +} + +// StorageClassClaimSpec defines the desired state of StorageClassClaim +type StorageClassClaimSpec struct { + //+kubebuilder:validation:Enum=blockpool;sharedfilesystem + Type string `json:"type"` + EncryptionMethod string `json:"encryptionMethod,omitempty"` + StorageProfile string `json:"storageProfile,omitempty"` + StorageClient *StorageClientNamespacedName `json:"storageClient"` +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:resource:scope=Cluster +//+kubebuilder:printcolumn:name="StorageType",type="string",JSONPath=".spec.type" +//+kubebuilder:printcolumn:name="StorageProfile",type="string",JSONPath=".spec.storageProfile" +//+kubebuilder:printcolumn:name="StorageClientName",type="string",JSONPath=".spec.storageClient.name" +//+kubebuilder:printcolumn:name="StorageClientNamespace",type="string",JSONPath=".spec.storageClient.namespace" +//+kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" + +// StorageClassClaim is the Schema for the storageclassclaims API +type StorageClassClaim struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + //+kubebuilder:validation:Required + //+kubebuilder:validation:XValidation:rule="oldSelf == self",message="spec is immutable" + Spec StorageClassClaimSpec `json:"spec"` + Status StorageClassClaimStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// StorageClassClaimList contains a list of StorageClassClaim +type StorageClassClaimList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageClassClaim `json:"items"` +} + +func init() { + SchemeBuilder.Register(&StorageClassClaim{}, &StorageClassClaimList{}) +} diff --git a/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/storageclient_types.go b/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/storageclient_types.go new file mode 100644 index 0000000000..28147c765d --- /dev/null +++ b/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/storageclient_types.go @@ -0,0 +1,82 @@ +/* +Copyright 2022 Red Hat, Inc. + +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 v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type storageClientPhase string + +const ( + // StorageClientInitializing represents Initializing state of storageClient + StorageClientInitializing storageClientPhase = "Initializing" + // StorageClientOnboarding represents Onboarding state of storageClient + StorageClientOnboarding storageClientPhase = "Onboarding" + // StorageClientOnboardingProgressing represents OnboardingProgressing state of storageClient + StorageClientOnboardingProgressing storageClientPhase = "Progressing" + // StorageClientConnected represents Onboarding state of storageClient + StorageClientConnected storageClientPhase = "Connected" + // StorageClientOffboarding represents Onboarding state of storageClient + StorageClientOffboarding storageClientPhase = "Offboarding" + // StorageClientFailed represents Failed state of storageClient + StorageClientFailed storageClientPhase = "Failed" +) + +// StorageClientSpec defines the desired state of StorageClient +type StorageClientSpec struct { + // StorageProviderEndpoint holds info to establish connection with the storage providing cluster. + StorageProviderEndpoint string `json:"storageProviderEndpoint"` + + // OnboardingTicket holds an identity information required for consumer to onboard. + OnboardingTicket string `json:"onboardingTicket"` +} + +// StorageClientStatus defines the observed state of StorageClient +type StorageClientStatus struct { + Phase storageClientPhase `json:"phase,omitempty"` + + // ConsumerID will hold the identity of this cluster inside the attached provider cluster + ConsumerID string `json:"id,omitempty"` +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" +//+kubebuilder:printcolumn:name="consumer",type="string",JSONPath=".status.id" + +// StorageClient is the Schema for the storageclients API +type StorageClient struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec StorageClientSpec `json:"spec,omitempty"` + Status StorageClientStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// StorageClientList contains a list of StorageClient +type StorageClientList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []StorageClient `json:"items"` +} + +func init() { + SchemeBuilder.Register(&StorageClient{}, &StorageClientList{}) +} diff --git a/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..01114c55e2 --- /dev/null +++ b/vendor/github.com/red-hat-storage/ocs-client-operator/api/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,229 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 Red Hat, Inc. + +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. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClassClaim) DeepCopyInto(out *StorageClassClaim) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassClaim. +func (in *StorageClassClaim) DeepCopy() *StorageClassClaim { + if in == nil { + return nil + } + out := new(StorageClassClaim) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageClassClaim) 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 *StorageClassClaimList) DeepCopyInto(out *StorageClassClaimList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageClassClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassClaimList. +func (in *StorageClassClaimList) DeepCopy() *StorageClassClaimList { + if in == nil { + return nil + } + out := new(StorageClassClaimList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageClassClaimList) 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 *StorageClassClaimSpec) DeepCopyInto(out *StorageClassClaimSpec) { + *out = *in + if in.StorageClient != nil { + in, out := &in.StorageClient, &out.StorageClient + *out = new(StorageClientNamespacedName) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassClaimSpec. +func (in *StorageClassClaimSpec) DeepCopy() *StorageClassClaimSpec { + if in == nil { + return nil + } + out := new(StorageClassClaimSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClassClaimStatus) DeepCopyInto(out *StorageClassClaimStatus) { + *out = *in + if in.SecretNames != nil { + in, out := &in.SecretNames, &out.SecretNames + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassClaimStatus. +func (in *StorageClassClaimStatus) DeepCopy() *StorageClassClaimStatus { + if in == nil { + return nil + } + out := new(StorageClassClaimStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClient) DeepCopyInto(out *StorageClient) { + *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 StorageClient. +func (in *StorageClient) DeepCopy() *StorageClient { + if in == nil { + return nil + } + out := new(StorageClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageClient) 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 *StorageClientList) DeepCopyInto(out *StorageClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClientList. +func (in *StorageClientList) DeepCopy() *StorageClientList { + if in == nil { + return nil + } + out := new(StorageClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageClientList) 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 *StorageClientNamespacedName) DeepCopyInto(out *StorageClientNamespacedName) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClientNamespacedName. +func (in *StorageClientNamespacedName) DeepCopy() *StorageClientNamespacedName { + if in == nil { + return nil + } + out := new(StorageClientNamespacedName) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClientSpec) DeepCopyInto(out *StorageClientSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClientSpec. +func (in *StorageClientSpec) DeepCopy() *StorageClientSpec { + if in == nil { + return nil + } + out := new(StorageClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageClientStatus) DeepCopyInto(out *StorageClientStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClientStatus. +func (in *StorageClientStatus) DeepCopy() *StorageClientStatus { + if in == nil { + return nil + } + out := new(StorageClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 09f151ef47..af4b17f857 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -382,6 +382,9 @@ github.com/prometheus/common/model github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util +# github.com/red-hat-storage/ocs-client-operator v0.0.0-20240216124345-1b9b7fb23b8d +## explicit; go 1.20 +github.com/red-hat-storage/ocs-client-operator/api/v1alpha1 # github.com/red-hat-storage/ocs-operator/api/v4 v4.0.0-00010101000000-000000000000 => ./api ## explicit; go 1.21 github.com/red-hat-storage/ocs-operator/api/v4/v1