Merge pull request #13377 from rook/mergify/bp/release-1.13/pr-13361
build: add cel rule to make resource immutable (backport #13361)
This commit is contained in:
4 files changed
+45
No files matched your search
@@ -36,9 +36,15 @@ spec:
|
||||
blockPoolName:
|
||||
description: BlockPoolName is the name of Ceph BlockPool. Typically it's the name of the CephBlockPool CR.
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: blockPoolName is immutable
|
||||
rule: self == oldSelf
|
||||
name:
|
||||
description: The name of the CephBlockPoolRadosNamespaceSpec namespace. If not set, the default is the name of the CR.
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: name is immutable
|
||||
rule: self == oldSelf
|
||||
required:
|
||||
- blockPoolName
|
||||
type: object
|
||||
@@ -7987,9 +7993,15 @@ spec:
|
||||
filesystemName:
|
||||
description: FilesystemName is the name of Ceph Filesystem SubVolumeGroup volume name. Typically it's the name of the CephFilesystem CR. If not coming from the CephFilesystem CR, it can be retrieved from the list of Ceph Filesystem volumes with `ceph fs volume ls`. To learn more about Ceph Filesystem abstractions see https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: filesystemName is immutable
|
||||
rule: self == oldSelf
|
||||
name:
|
||||
description: The name of the subvolume group. If not set, the default is the name of the subvolumeGroup CR.
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: name is immutable
|
||||
rule: self == oldSelf
|
||||
pinning:
|
||||
description: Pinning configuration of CephFilesystemSubVolumeGroup, reference https://docs.ceph.com/en/latest/cephfs/fs-volumes/#pinning-subvolumes-and-subvolume-groups only one out of (export, distributed, random) can be set at a time
|
||||
properties:
|
||||
|
||||
@@ -39,9 +39,15 @@ spec:
|
||||
blockPoolName:
|
||||
description: BlockPoolName is the name of Ceph BlockPool. Typically it's the name of the CephBlockPool CR.
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: blockPoolName is immutable
|
||||
rule: self == oldSelf
|
||||
name:
|
||||
description: The name of the CephBlockPoolRadosNamespaceSpec namespace. If not set, the default is the name of the CR.
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: name is immutable
|
||||
rule: self == oldSelf
|
||||
required:
|
||||
- blockPoolName
|
||||
type: object
|
||||
@@ -7981,9 +7987,15 @@ spec:
|
||||
filesystemName:
|
||||
description: FilesystemName is the name of Ceph Filesystem SubVolumeGroup volume name. Typically it's the name of the CephFilesystem CR. If not coming from the CephFilesystem CR, it can be retrieved from the list of Ceph Filesystem volumes with `ceph fs volume ls`. To learn more about Ceph Filesystem abstractions see https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: filesystemName is immutable
|
||||
rule: self == oldSelf
|
||||
name:
|
||||
description: The name of the subvolume group. If not set, the default is the name of the subvolumeGroup CR.
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: name is immutable
|
||||
rule: self == oldSelf
|
||||
pinning:
|
||||
description: Pinning configuration of CephFilesystemSubVolumeGroup, reference https://docs.ceph.com/en/latest/cephfs/fs-volumes/#pinning-subvolumes-and-subvolume-groups only one out of (export, distributed, random) can be set at a time
|
||||
properties:
|
||||
|
||||
@@ -2923,12 +2923,14 @@ type CephFilesystemSubVolumeGroupList struct {
|
||||
// CephFilesystemSubVolumeGroupSpec represents the specification of a Ceph Filesystem SubVolumeGroup
|
||||
type CephFilesystemSubVolumeGroupSpec struct {
|
||||
// The name of the subvolume group. If not set, the default is the name of the subvolumeGroup CR.
|
||||
// +kubebuilder:validation:XValidation:message="name is immutable",rule="self == oldSelf"
|
||||
// +optional
|
||||
Name string `json:"name,omitempty"`
|
||||
// FilesystemName is the name of Ceph Filesystem SubVolumeGroup volume name. Typically it's the name of
|
||||
// the CephFilesystem CR. If not coming from the CephFilesystem CR, it can be retrieved from the
|
||||
// list of Ceph Filesystem volumes with `ceph fs volume ls`. To learn more about Ceph Filesystem
|
||||
// abstractions see https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes
|
||||
// +kubebuilder:validation:XValidation:message="filesystemName is immutable",rule="self == oldSelf"
|
||||
FilesystemName string `json:"filesystemName"`
|
||||
// Pinning configuration of CephFilesystemSubVolumeGroup,
|
||||
// reference https://docs.ceph.com/en/latest/cephfs/fs-volumes/#pinning-subvolumes-and-subvolume-groups
|
||||
@@ -2998,10 +3000,12 @@ type CephBlockPoolRadosNamespaceList struct {
|
||||
// CephBlockPoolRadosNamespaceSpec represents the specification of a CephBlockPool Rados Namespace
|
||||
type CephBlockPoolRadosNamespaceSpec struct {
|
||||
// The name of the CephBlockPoolRadosNamespaceSpec namespace. If not set, the default is the name of the CR.
|
||||
// +kubebuilder:validation:XValidation:message="name is immutable",rule="self == oldSelf"
|
||||
// +optional
|
||||
Name string `json:"name,omitempty"`
|
||||
// BlockPoolName is the name of Ceph BlockPool. Typically it's the name of
|
||||
// the CephBlockPool CR.
|
||||
// +kubebuilder:validation:XValidation:message="blockPoolName is immutable",rule="self == oldSelf"
|
||||
BlockPoolName string `json:"blockPoolName"`
|
||||
}
|
||||
|
||||
|
||||
@@ -1904,6 +1904,23 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||
in.Security.DeepCopyInto(&out.Security)
|
||||
in.LogCollector.DeepCopyInto(&out.LogCollector)
|
||||
in.CSI.DeepCopyInto(&out.CSI)
|
||||
if in.CephConfig != nil {
|
||||
in, out := &in.CephConfig, &out.CephConfig
|
||||
*out = make(map[string]map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
var outVal map[string]string
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
in, out := &val, &outVal
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
(*out)[key] = outVal
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user