Remove conflicting labels from CRDs
Pull Request Motivation
- Removes a conflict when deployed through ArgoCD that sets up its own
app.kubernetes.io/instancelabel (https://github.com/argoproj/argo-cd/issues/6728). No need for workarounds like https://github.com/HariSekhon/Kubernetes-configs/blob/master/cert-manager/base/remove-instance-label.jsonpatch.yaml. If theapp.kubernetes.io/instancelabel is set within the Helm chart then ArgoCD reports warnings like:
SharedResourceWarning CustomResourceDefinition/certificaterequests.cert-manager.io is part of applications cert-manager-production and cert-manager
- This small tweak also makes CRDs valid Kubernetes manifests that are trivially to deploy (see https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#from-46x-to-47x). But still allows them to be modified by your release process.
Kind
feature
Release Note
NONE
Hi @gw0. Thanks for your PR.
I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: gw0 Once this PR has been reviewed and has the lgtm label, please assign meyskens for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale
/remove-lifecycle stale
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale
/remove-lifecycle stale
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
/lifecycle rotten
/remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
/close
@cert-manager-bot: Closed this PR.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopen. Mark the issue as fresh with/remove-lifecycle rotten. /close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Can this be re-opened? This is still an issue for us.
We are using argocd and using the option to install the CRD's in the values file which works well. It's just we are getting this same issue because of the conflicting annotation since argocd project and app of apps is managing it also so the label for app.kubernetes.io/instance is conflicting.
We cannot use kubectl patch for this since it doesn't support custom resources in the cmd line. We can however do a post install edit of each resource and remove the line for the label and then tell argocd to ignore the differences on those files with
ignoreDifferences:
- group: '*'
kind: CustomResourceDefinition
jsonPointers:
- /metadata/labels/app.kubernetes.io~1instance
It would be great if we didn't have to do this. Any suggestions here.