Annotate StackGres-generated CRs
We need to provide a mechanism to upgrade across StackGres versions. In order to determine the correct upgrade procedure, we need to know which operator version created each CR. To achieve that, we have to annotate every generated CR with the version of the operator that created it.
There is no need to version-annotate the CRDs, as they have like any K8s object, its own top-level versioning.
In general, we should define the category of StackGres annotations, which could take a form similar to:
@stackgres.io({annotationKey}={value})
where in this case {annotationKey}
would be operatorVersion
.
(other formats, if standardized on Kubernetes, may be proposed)
Tasks:
-
Determine the exact annotation format. Research if there's any "standard" in K8s as to what format should this custom annotations have -
Implement in the operator (may be a mutator webhook, or other) the functionality that every generated CR must include this annotation with the version of the operator
Edited by Xavier Sierra