forked from ceph/ceph-csi-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ceph#8 from red-hat-storage/sync_us--main
Syncing latest changes from upstream main for ceph-csi-operator
- Loading branch information
Showing
610 changed files
with
71,052 additions
and
24,377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,6 @@ go.work.sum | |
*.orig | ||
*.patch | ||
*.rej | ||
|
||
# Locally generated install files | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/* | ||
Copyright 2024. | ||
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 ( | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// CephFsConfigSpec defines the desired CephFs configuration | ||
type CephFsConfigSpec struct { | ||
//+kubebuilder:validation:Optional | ||
SubVolumeGroup string `json:"subVolumeGroup,omitempty"` | ||
|
||
//+kubebuilder:validation:Optional | ||
KernelMountOptions map[string]string `json:"kernelMountOptions,omitempty"` | ||
|
||
//+kubebuilder:validation:Optional | ||
FuseMountOptions map[string]string `json:"fuseMountOptions,omitempty"` | ||
} | ||
|
||
// RbdConfigSpec defines the desired RBD configuration | ||
type RbdConfigSpec struct { | ||
//+kubebuilder:validation:Optional | ||
RadosNamespace string `json:"radosNamespace,omitempty"` | ||
} | ||
|
||
// NfsConfigSpec cdefines the desired NFS configuration | ||
type NfsConfigSpec struct { | ||
} | ||
|
||
// ClientProfileSpec defines the desired state of Ceph CSI | ||
// configuration for volumes and snapshots configured to use | ||
// this profile | ||
type ClientProfileSpec struct { | ||
//+kubebuilder:validation:Required | ||
//+kubebuilder:validation:XValidation:rule=self.name != "",message="'.name' cannot be empty" | ||
CephConnectionRef corev1.LocalObjectReference `json:"cephConnectionRef"` | ||
|
||
//+kubebuilder:validation:Optional | ||
CephFs *CephFsConfigSpec `json:"cephFs,omitempty"` | ||
|
||
//+kubebuilder:validation:Optional | ||
Rbd *RbdConfigSpec `json:"rbd,omitempty"` | ||
|
||
//+kubebuilder:validation:Optional | ||
Nfs *NfsConfigSpec `json:"nfs,omitempty"` | ||
} | ||
|
||
// ClientProfileStatus defines the observed state of Ceph CSI | ||
// configuration for volumes and snapshots configured to use | ||
// this profile | ||
type ClientProfileStatus struct { | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
|
||
// ClientProfile is the Schema for the clientprofiles API | ||
type ClientProfile struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec ClientProfileSpec `json:"spec,omitempty"` | ||
Status ClientProfileStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// ClientProfileList contains a list of ClientProfile | ||
type ClientProfileList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []ClientProfile `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&ClientProfile{}, &ClientProfileList{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
Copyright 2024. | ||
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" | ||
) | ||
|
||
// BlockPoolRefSpec identify a blockpool - client profile pair | ||
type BlockPoolRefSpec struct { | ||
//+kubebuilder:validation:Required | ||
ClientProfileName string `json:"clientProfileName,omitempty"` | ||
|
||
//+kubebuilder:validation:Required | ||
//+kubebuilder:validation:Minimum:=0 | ||
PoolId int `json:"poolId,omitempty"` | ||
} | ||
|
||
// BlockPoolMappingSpec define a mapiing between a local and remote block pools | ||
type BlockPoolMappingSpec struct { | ||
//+kubebuilder:validation:Required | ||
Local BlockPoolRefSpec `json:"local,omitempty"` | ||
|
||
//+kubebuilder:validation:Required | ||
Remote BlockPoolRefSpec `json:"remote,omitempty"` | ||
} | ||
|
||
// ClientProfileMappingSpec defines the desired state of ClientProfileMapping | ||
type ClientProfileMappingSpec struct { | ||
//+kubebuilder:validation:Optional | ||
BlockPoolMapping []BlockPoolMappingSpec `json:"blockPoolMapping,omitempty"` | ||
} | ||
|
||
// ClientProfileMappingStatus defines the observed state of ClientProfileMapping | ||
type ClientProfileMappingStatus struct { | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
|
||
// ClientProfileMapping is the Schema for the clientprofilemappings API | ||
type ClientProfileMapping struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec ClientProfileMappingSpec `json:"spec,omitempty"` | ||
Status ClientProfileMappingStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// ClientProfileMappingList contains a list of ClientProfileMapping | ||
type ClientProfileMappingList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []ClientProfileMapping `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&ClientProfileMapping{}, &ClientProfileMappingList{}) | ||
} |
Oops, something went wrong.