add custom labels and annotations for crds#812
Open
UndeadDemidov wants to merge 1 commit intocloudnative-pg:mainfrom
Open
add custom labels and annotations for crds#812UndeadDemidov wants to merge 1 commit intocloudnative-pg:mainfrom
UndeadDemidov wants to merge 1 commit intocloudnative-pg:mainfrom
Conversation
Signed-off-by: UndeadDemidov <nikolay.demidov@gmail.com>
Collaborator
|
I can accept this if you modify the RELEASE.md to include a command(s) that automatically adds the new yaml. Otherwise, with the current release procedure, the moment we do another release, your changes will be lost. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add custom labels and annotations support for CRDs
Summary
This PR adds the ability to configure custom labels and annotations for CloudNativePG CRDs through Helm values. This enhancement is particularly useful for ArgoCD users who need to enable server-side apply for CRDs managed by ArgoCD.
Changes
crds.labelsandcrds.annotationsconfiguration options invalues.yamlvalues.schema.jsonto include validation for the new fieldsbackups.postgresql.cnpg.ioclusterimagecatalogs.postgresql.cnpg.ioclusters.postgresql.cnpg.iodatabases.postgresql.cnpg.iofailoverquorums.postgresql.cnpg.ioimagecatalogs.postgresql.cnpg.iopoolers.postgresql.cnpg.ioUse Case
This feature enables ArgoCD users to add annotations like
argocd.argoproj.io/sync-options: ServerSideApply=trueto CRDs, which is required for proper CRD management in ArgoCD environments.Example Usage
crds:
create: true
labels:
app.kubernetes.io/managed-by: argocd
annotations:
argocd.argoproj.io/sync-options: ServerSideApply=true
Tests
This commit locally tested in k3d+argocd