-
Notifications
You must be signed in to change notification settings - Fork 18
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
Added finalizer to kbsConfig CRD during creation #27
Conversation
@@ -294,6 +295,10 @@ func (r *KbsConfigReconciler) deployOrUpdateKbsDeployment(ctx context.Context) e | |||
} | |||
|
|||
// Add the kbsFinalizer to the KbsConfig if it doesn't already exist | |||
return r.addKbsConfigFinalizer(ctx) |
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 finalizer needs to be added only during the creation. So this can be removed.
@@ -275,7 +275,8 @@ func (r *KbsConfigReconciler) deployOrUpdateKbsDeployment(ctx context.Context) e | |||
} else { | |||
// Deployment created successfully | |||
r.log.Info("Created a new deployment", "Deployment.Namespace", r.namespace, "Deployment.Name", KbsDeploymentName) | |||
return nil | |||
// Add the kbsFinalizer to the KbsConfig if it doesn't already exist | |||
return r.addKbsConfigFinalizer(ctx) |
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.
Good catch. ..This was missing
Signed-off-by: Leonardo Milleri <[email protected]>
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
…4-my-rebase Revert "Rebase upstream 26-jul"
Making sure the finalizer is added to the KbsResource at creation time