kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.96k stars 1.47k forks source link

[helm chart] add resource-policy annotations to crds #3949

Open aburan28 opened 4 days ago

aburan28 commented 4 days ago

Issue

Guidance on upgrades for AWS LB controller includes references to uninstalling the old version before moving to the new version of the controller. In those cases it would be ideal if we could retain the CRDs during that uninstall so as to prevent downtime associated with a fresh install.

Description

CRDs are deleted by default when the helm chart is uninstalled. Offering an option to retain those resources would be great. Addittionally it would be ideal to pass in annotations to the CRDs.

In this PR I've added the following section which allow for configuring whether or not the helm "helm.sh/resource-policy": keep annotation is added to the CRDs, whether or not the CRDs are installed, and additional annotations that could be passed into the CRDs.

crds:
  keep: false
  install: true
  annotations: {}

Checklist

BONUS POINTS checklist: complete for good vibes and maybe prizes?! :exploding_head:

k8s-ci-robot commented 4 days ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aburan28 Once this PR has been reviewed and has the lgtm label, please assign johngmyers for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
k8s-ci-robot commented 4 days ago

Hi @aburan28. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.