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

pause: support unpausing object by removing the label #31

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

ecordell
Copy link
Contributor

This adds support for removing the paused condition when the pause label is removed (whether added by a user or a controller)

Currently, unpausing requires both removing the label and editing the status to remove the condition, which is a pain (difficult to do without a kubectl plugin)

@ecordell ecordell marked this pull request as ready for review January 11, 2023 22:38
func (s StatusWithConditions[S]) GetStatusConditions() []metav1.Condition {
return *s.Status.GetStatusConditions()
func (s *StatusWithConditions[S]) GetStatusConditions() *[]metav1.Condition {
var nilS S
Copy link
Member

Choose a reason for hiding this comment

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

I've been calling these variables "zero" since it's a trick to get the zero value for a type.

conditions/conditions.go Outdated Show resolved Hide resolved
@ecordell ecordell merged commit 3b0fa4d into authzed:main Jan 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants