Skip to content
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

Ingress deletion by label instead of name #367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kaiivoschneider
Copy link

@kaiivoschneider kaiivoschneider commented Nov 14, 2023

Summary

The Mattermost operator keeps deleting Ingresses it did not create itself if they have the same name. It makes more sense for the operator to find resources by their labels. That is what Kubernetes labels are for.

Release Note

NONE

@mm-cloud-bot
Copy link

@kaiivoschneider: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

I understand the commands that are listed here

LabelSelector: labels.SelectorFromSet(labelSet),
})

if err != nil && len(foundIngresses.Items) > 0 {
return nil
} else if err != nil {
return errors.Wrap(err, "failed to check if ingress exists")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Since only one result is expected, should we handle and raise an error if the list retrieves more than one result or should we remove all results? cc: @mattermost/cloud

@hanzei hanzei added the 2: Dev Review Requires review by a developer label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a developer release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants