Skip to content

Conversation

kashok-splunk
Copy link
Contributor

  • Delete CR as the owner of MC statefulset when deleting CR

Comment on lines +69 to +76
namespacedName := types.NamespacedName{Namespace: cr.GetNamespace(), Name: GetSplunkStatefulsetName(SplunkMonitoringConsole, cr.GetNamespace())}
if cr.GetObjectMeta().GetDeletionTimestamp() != nil {
addNewURLs = false
//explicit removal of owners for MC
_, err = splctrl.RemoveStatefulSetOwnerRef(client, cr, namespacedName)
if err != nil {
return err
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking this, Assuming this change is to have the MC running even if the last CR is deleted(?), then we can avoid setting the owner reference in the first place unless the CRs are really interested in the MC STS state changes(?). If so, I guess, we don't need any of these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants