Optimize and fix some issues#2
Conversation
| annotations: | ||
| "helm.sh/hook": "pre-install" | ||
| "helm.sh/hook-delete-policy": "before-hook-creation" | ||
| "helm.sh/hook-weight": "5" |
There was a problem hiding this comment.
This is to apply the new CA when performing an upgrade
| // check and add finalizer | ||
| if !controllerutil.ContainsFinalizer(config, kubeovniov1.KubeOVNConfigurationFinalizer) { | ||
| controllerutil.AddFinalizer(config, kubeovniov1.KubeOVNConfigurationFinalizer) | ||
| if controllerutil.AddFinalizer(config, kubeovniov1.KubeOVNConfigurationFinalizer) { |
There was a problem hiding this comment.
Delete unnecessary conditional judgments
| UpdateFunc: func(e event.TypedUpdateEvent[client.Object]) bool { | ||
| return !reflect.DeepEqual(e.ObjectOld.GetLabels(), e.ObjectNew.GetLabels()) | ||
| }, | ||
| })) |
There was a problem hiding this comment.
Ensure that reconciliation can be performed when node changes occur
| // patch version supplied by the controller | ||
| config.Spec.Global.Images.KubeOVNImage.Tag = version | ||
| if len(config.Spec.Global.Images.KubeOVNImage.Tag) == 0 { | ||
| config.Spec.Global.Images.KubeOVNImage.Tag = version |
There was a problem hiding this comment.
When the tag is explicitly specified in the CR, the specified one should be used first
There was a problem hiding this comment.
current iteration does not allow tag override since there may be some changes needed to the charts template and updating the tag may not work
There was a problem hiding this comment.
current iteration does not allow tag override since there may be some changes needed to the charts template and updating the tag may not work
Ok, I will retract the changes made here
| {{- if not .Values.disableModulesManagement }} | ||
| - SYS_MODULE | ||
| {{- end }} | ||
| - NET_RAW |
There was a problem hiding this comment.
Fix possible permission issues
| return ctrl.Result{}, nil | ||
| } else if err != nil { | ||
| r.Log.WithValues("name", req.Name).Error(err, "error fetching object") | ||
| return ctrl.Result{}, err |
There was a problem hiding this comment.
Get node failed and returned an error to retry, instead of continuing to execute downwards
Signed-off-by: coldzerofear <coldzerofear@outlook.com>
Problem:
Solution:
Related Issue(s):
Test plan:
Additional documentation or context