Task to set Status Condition for Kubernetes resources
What does this MR do?
This change introduces a simple Task
to define and change the
Conditions of Status sub-resource for Kubernetes resources, most
notably GitLab custom resources.
It uses Condition
type and functions from k8s.io/apimachinery
.
With this task you can add a new condition, or change or remove an
existing one from list Conditions. In addition a reference to the
Kuberentes resource, i.e. the Source
field, you must also pass the
pointer to the Conditions
slice in its Status
sub-resource. The
task uses this reference to change the list of resource Conditions.
It also tries to guess the observedGeneration
and lastTransitionTime
based on the current Status of the associated resource.
Author's Checklist
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
Ensure a release milestone is set. -
MR title and description are up to date, accurate, and descriptive. -
MR targeting the appropriate branch. -
MR has a green pipeline on GitLab.com. -
When ready for review, MR is labeled workflowready for review per the MR workflow.
Expected
-
Test plan indicating conditions for success has been posted and passes. -
Documentation is created or updated. -
Tests are added.
Related issues
Closes #41 (closed)