Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leelavg
Copy link
Contributor

@leelavg leelavg commented Feb 26, 2025

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.

StorageQuotaInGiB int `json:"storageQuotaInGiB,omitempty"`
StorageQuotaInGiB int `json:"storageQuotaInGiB,omitempty"`
RadosNamespace string `json:"radosNamespace,omitempty"`
SubVolumeGroup string `json:"subVolumeGroup,omitempty"`
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StorageClasses []ClassSpec `json:"storageClasses,omitempty"`
VolumeSnapshotClasses []ClassSpec `json:"volumeSnapshotClasses,omitempty"`
VolumeGroupSnapshotClasses []ClassSpec `json:"volumeGroupSnapshotClasses,omitempty"`
ClientProfiles []string `json:"clientProfiles,omitempty"`
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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?

Copy link
Contributor Author

@leelavg leelavg Feb 28, 2025

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.

Copy link
Contributor

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

Copy link
Contributor

openshift-ci bot commented Feb 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: leelavg
Once this PR has been reviewed and has the lgtm label, please ask for approval from nb-ohad. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Comment on lines 46 to 47
RadosNamespace string `json:"radosNamespace,omitempty"`
SubVolumeGroup string `json:"subVolumeGroup,omitempty"`
Copy link
Member

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?

Copy link
Contributor

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?

@leelavg
Copy link
Contributor Author

leelavg commented Mar 5, 2025

/hold

Will squash after final review

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 5, 2025
Comment on lines 48 to 55
// +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"`
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Comment on lines 132 to 133
type RadosNamespaceSpec struct {
Name string `json:"name"`
}

type SubVolumeGroupSpec struct {
Name string `json:"name"`
}

type ClientProfileSpec struct {
Name string `json:"name"`
}

Copy link
Contributor

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

Copy link
Contributor Author

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"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SubVolumeGroup string `json:"subVolumeGroup"`
SubVolumeGroup string `json:"subVolumeGroup,omitempty"`

since it is Optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omitempty == // +kubebuilder:validation:Optional

leelavg added 2 commits March 7, 2025 07:34
Signed-off-by: Leela Venkaiah G <[email protected]>
Signed-off-by: Leela Venkaiah G <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants