-
Notifications
You must be signed in to change notification settings - Fork 37
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
distributedstorage: Implementing rook installation using the fleet pl… #413
distributedstorage: Implementing rook installation using the fleet pl… #413
Conversation
…ugin Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
✅ Deploy Preview for kurator-dev canceled.
|
|
||
// After Rook operator are created, starts to install rook-ceph | ||
if distributedStorageCfg.Storage == nil { | ||
// reconcilePluginResources will delete all resources if plugin is 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.
cc @Xieql
We donot support plugin uninstall now, right?
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.
we support uninstall plugin. see https://kurator.dev/docs/fleet-manager/backup/backup-plugin/
1. Cleanup the Backup Plugin
If you only need to remove the backup plugin, simply edit the current fleet and remove the corresponding description:
kubectl edit fleet.fleet.kurator.dev quickstart
To check the results of the deletion, you can observe that the Velero components have been removed:
kubectl get po -A --kubeconfig=/root/.kube/kurator-member1.config
kubectl get po -A --kubeconfig=/root/.kube/kurator-member2.config
If you wish to reinstall the components later, you can simply edit the fleet and add the necessary configurations.
2. Cleanup the Fleet
When the fleet is deleted, all associated plugins will also be removed:
kubectl delete fleet.fleet.kurator.dev quickstart
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.
IIRC, the uninstall is supported by FluxCD. If helmrelease
is removed,the uninstall will be proformed
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.
see
kurator/pkg/fleet-manager/fleet_plugin.go
Lines 105 to 107 in 52c2828
// reconcilePluginResources delete redundant HelmRelease and HelmRepository resources, | |
// for example, disable metric plugin will try to delete metric plugin resources. | |
func (f *FleetManager) reconcilePluginResources(ctx context.Context, fleet *fleetapi.Fleet, resources kube.ResourceList) (ctrl.Result, error) { |
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.
Thanks i find it
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
pkg/fleet-manager/plugin/plugin.go
Outdated
if monitorCfg.Annotations != nil { | ||
_, ok := customValues["annotations"] | ||
if !ok { | ||
monitorMap := make(map[string]interface{}) |
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 only monitor map, this annotationMap for all the components
pkg/fleet-manager/plugin/plugin.go
Outdated
monitorMap["mon"] = monitorCfg.Annotations | ||
customValues["annotations"] = monitorMap | ||
} else { | ||
monitorMap := customValues["annotations"].(map[string]interface{}) |
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.
nit: In L379, you already got the map
defaultValues := c.Values | ||
// In the rook, the Labels, annotation and Placement of Monitor and manager are configured under the Labels, annotation and Placement fields. | ||
// So it need to be rebuild customValues using user settings in distributedStorage. | ||
customValues := make(map[string]interface{}) |
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 abstract below values construction into a separate function
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 |
…ugin
What type of PR is this?
Distributed Storage Implementation
What this PR does / why we need it:
Implementing rook installation using the fleet plugin.