-
Notifications
You must be signed in to change notification settings - Fork 38
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
Storage proposal #385
Storage proposal #385
Conversation
@LiZhenCheng9527: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
✅ Deploy Preview for kurator-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
// ClusterSpec indicates the state that the cluster wants to be in | ||
// +optional | ||
ClusterSpec StorageClusterSpec `json:"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.
what if multiple clusters use the same StorageClusterSpec?
Is there a potential for duplicate StorageClusterSpec definitions if multiple clusters use the same spec?
you can consider fleet cluster, see
kurator/pkg/fleet-manager/fleet_cluster.go
Lines 45 to 74 in 76fcb95
func buildFleetClusters(ctx context.Context, client client.Client, fleet *fleetapi.Fleet) (map[ClusterKey]*fleetCluster, error) { | |
log := ctrl.LoggerFrom(ctx) | |
res := make(map[ClusterKey]*fleetCluster, len(fleet.Spec.Clusters)) | |
for _, cluster := range fleet.Spec.Clusters { | |
clusterKey := types.NamespacedName{Namespace: fleet.Namespace, Name: cluster.Name} | |
clusterInterface, err := getFleetClusterInterface(ctx, client, cluster.Kind, clusterKey) | |
// TODO: should we make it work | |
if err != nil { | |
return nil, err | |
} | |
if !clusterInterface.IsReady() { | |
log.V(4).Info("cluster is not ready", "cluster", clusterKey) | |
continue | |
} | |
kclient, err := clientForCluster(client, fleet.Namespace, clusterInterface) | |
if err != nil { | |
return nil, err | |
} | |
res[ClusterKey{Kind: cluster.Kind, Name: cluster.Name}] = &fleetCluster{ | |
Secret: clusterInterface.GetSecretName(), | |
SecretKey: clusterInterface.GetSecretKey(), | |
client: kclient, | |
} | |
} | |
return res, nil | |
} |
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.
Previously I thought fleet was able to filter managed clusters by label, but fleet doesn't support it. It will allow users to directly specify which clusters use the same ClusterSpec to avoid having multiple identical ClusterSpecs.
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 not user friendly.
Keep in mind, when design an api, it is a user-faced one, we should put UX as the highest priority.
For this target, we should expose only necessary settings with explicitly readable fields.
- **unified distributed cloud storage** | ||
- Supports three types of storage: Block storage, Filesystem storage and Object storage. | ||
- Support for scoping different storage types by name, label, and Annotation. | ||
- Support for applying these policies to multiple clusters or a single cluster. |
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.
Not sure what policies you mean
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.
policy means storage type policies on nodes. To make the description clearer, third bullet point will be modified to Support for applying storage type policies on nodes to multiple clusters.
And The second bullet will be modified to Support for specifying different storage types at different nodes by name, label and annotation.
|
||
- **unified distributed cloud storage** | ||
- Supports three types of storage: Block storage, Filesystem storage and Object storage. | ||
- Support for scoping different storage types by name, label, and Annotation. |
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.
what does scoping mean
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.
Scoping means delimit the use of a storage type.
It is not clearly expressed here and will be modified to Support for specifying different storage types at different nodes by name, label and annotation.
and make progress. | ||
--> | ||
|
||
- **support for another distributed storage system** Rook only supports ceph distributed storage system, so it does not support other distributed storage systems. |
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 an implementation detail.
NON-goals should be like this, do not support XXX storage, do not support storage backup/snapshot
// The annotations-related configuration to add/set on each Pod related object. | ||
// +nullable | ||
// +optional | ||
Annotations rookv1.AnnotationsSpec `json:"annotations,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.
What are these annotations for? It it a must?
// +kubebuilder:pruning:PreserveUnknownFields | ||
// +nullable | ||
// +optional | ||
Labels rookv1.LabelsSpec `json:"labels,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.
same questions as annotations
Mon MonSpec `json:"mon,omitempty"` | ||
|
||
// mgr is responsible for connect between the node and operator | ||
// A spec for mgr related options | ||
// +optional | ||
// +nullable | ||
Mgr MgrSpec `json:"mgr,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.
As a user, i cannot understand these two fields at all
// +kubebuilder:pruning:PreserveUnknownFields | ||
// +nullable | ||
// +optional | ||
Placement PlacementSpec `json:"placement,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.
place what?
// e.g. /var/lib/rook | ||
// +kubebuilder:validation:Pattern=`^/(\S+)` | ||
// +optional | ||
DataDirHostPath string `json:"dataDirHostPath,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.
which component uses this config
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 it is still lack of the usage info, please put it under the plugins
--> | ||
Kurator, as an open-source distributed cloud-native platform, has been pivotal in aiding users to construct their distributed cloud-native infrastructure, thereby facilitating enterprise digital transformation. | ||
|
||
In order to further enhance its functionality, this proposal introduces a unified solution for distributed storage across multiple clsuters in `Fleet` through a seamless one-click operation. |
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.
clsuters
typo
// +optional | ||
DataDirHostPath string `json:"dataDirHostPath,omitempty"` | ||
|
||
// Monitor is the daemon for the state of ceph cluster. |
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 not a sentence, can you complete it
```console | ||
// DistributedStorageSpec is the schema for the DistributedStorage's API. | ||
// Note: partly copied from https://github.com/rook/rook/blob/release-1.10/pkg/apis/ceph.rook.io/v1/types.go | ||
type DistributedStorageSpec struct { |
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.
Please donot call xxxSpec, unless it is a separate CRD
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.
Generally LGTM
// +optional | ||
Chart *ChartConfig `json:"chart,omitempty"` | ||
|
||
// Storage provides details on where the backup data should be stored. |
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.
remove on
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.
why should you mention backup?
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind design
/kind documentation
What this PR does / why we need it:
add proposal aimed to enhance Kurator by introducing unified distributed storage capabilities.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
add proposal for unified distributed storage