-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update storageconsumer api for centralising distribution and making it user facing #3062
base: main
Are you sure you want to change the base?
Conversation
0ad3ebd
to
de21a76
Compare
StorageQuotaInGiB int `json:"storageQuotaInGiB,omitempty"` | ||
StorageQuotaInGiB int `json:"storageQuotaInGiB,omitempty"` | ||
RadosNamespace string `json:"radosNamespace,omitempty"` | ||
SubVolumeGroup string `json:"subVolumeGroup,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call this SubVolumeGroup
or CephFsSubVolumeGroup
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I picked these names to be consistent with clientprofile fields https://github.com/ceph/ceph-csi-operator/blob/main/api/v1alpha1/clientprofile_types.go
StorageClasses []ClassSpec `json:"storageClasses,omitempty"` | ||
VolumeSnapshotClasses []ClassSpec `json:"volumeSnapshotClasses,omitempty"` | ||
VolumeGroupSnapshotClasses []ClassSpec `json:"volumeGroupSnapshotClasses,omitempty"` | ||
ClientProfiles []string `json:"clientProfiles,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leelavg I believe we agreed that ClientProfiles are not admin configurable. Why do we have this as part of the consumer spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, we decided to remove the secret (provisioner, node) aliases from spec but not clientProfiles.
Nevertheless, if we already know the storageconsumer upgrade mode we can figure these out, will update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In one of the meetings, we were talking about having the clientProfile name something similar to storageID (ceph_FSID,radosnamespace) and (ceph_FSID,subvolumegroupName). If we are going with that shouldn't we have two different clientProfiles? one for rbd and another for cephfs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was in context when @Madhu-1 raised a point wrt MDR but it was decided that StorageConsumerUID will always be unique (for all intents & purposes) and could be used as clusterID and subsequently as clientProfile, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all depends on the clientProfile naming scheme. Do we have a PR in place where we are calculating the clientProfile names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, didn't we settle w/ storageconsumer uid as they are unique? I don't remember choosing to calculating anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leelavg @Madhu-1 @rewantsoni
Going forward we have a single scheme as discussed and agreed and captured on the weekly call meeting notes.
We will support the older schemes based on the indicator that marks an updated internal or updated provider.
In all cases, this is not an admin nob
de21a76
to
d95bfc1
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: leelavg The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
RadosNamespace string `json:"radosNamespace,omitempty"` | ||
SubVolumeGroup string `json:"subVolumeGroup,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nb-ohad should we also have this as object struct with name, so can we extend it later based on the requirements? thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. The idea is to point particular consumer to a specific entity by identifying it.
Are you predicting that we need more then a name to uniquely identify these Ceph entities?
/hold Will squash after final review |
// +kubebuilder:validation:Optional | ||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" | ||
// +kubebuilder:validation:MaxLength=512 | ||
RadosNamespace string `json:"radosNamespace"` | ||
// +kubebuilder:validation:Optional | ||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" | ||
// +kubebuilder:validation:MaxLength=512 | ||
SubVolumeGroup string `json:"subVolumeGroup"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validation here does not make sense. This need to be configurable all the way until the Consumer is enabled. At that point we should freeze it.
But I question the need of adding these fields as part of this PR. Why do we need to couple these changes with the rest of the changes in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
type RadosNamespaceSpec struct { | ||
Name string `json:"name"` | ||
} | ||
|
||
type SubVolumeGroupSpec struct { | ||
Name string `json:"name"` | ||
} | ||
|
||
type ClientProfileSpec struct { | ||
Name string `json:"name"` | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you meant to have these with a Status safix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, done.
// +kubebuilder:validation:Optional | ||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" | ||
// +kubebuilder:validation:MaxLength=512 | ||
SubVolumeGroup string `json:"subVolumeGroup"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SubVolumeGroup string `json:"subVolumeGroup"` | |
SubVolumeGroup string `json:"subVolumeGroup,omitempty"` |
since it is Optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omitempty == // +kubebuilder:validation:Optional
Signed-off-by: Leela Venkaiah G <[email protected]>
Signed-off-by: Leela Venkaiah G <[email protected]>
new fields with *Classes are intended to be filled by storage admin for distributing to connected client cluster that the storageconsumer represents. Only
name
is specified and later will be expanded if more config is required.clientProfiles represents all the aliases that provider needs to send to client for a clientProfile which has RBD & SVG details that the client has access to.