Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm cleanup #4188

Closed
wants to merge 2 commits into from
Closed

Helm cleanup #4188

wants to merge 2 commits into from

Conversation

inteon
Copy link
Member

@inteon inteon commented Jul 7, 2021

What this PR does / why we need it:

  1. Currently a very complex bazel workflow is used to generate static yaml files from the helm chart.
    This PR drastically simplifies that workflow, by moving most of the logic to the helm file and by removing unnecessary operations.

  2. The helm value components is added, this value selects what resources should be included in the rendered helm chart.
    Now we can do a helm install where the CRDs are in a separate helm deployment (this logic is also used for static yaml generation):

helm template \
  cert-manager jetstack/cert-manager \
  --set components={crd} \
  --version v1.4.0 | kubectl apply -f -

helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.4.0
  1. The installCRDs helm value can be replaced by components. I added a deprecation warning notifying the chart user that this option might get removed in later releases.

Release note:

/kind cleanup

@jetstack-bot
Copy link
Collaborator

@inteon: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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.

@jetstack-bot jetstack-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. area/deploy Indicates a PR modifies deployment configuration labels Jul 7, 2021
@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: inteon
To complete the pull request process, please assign irbekrm after the PR has been reviewed.
You can assign the PR to them by writing /assign @irbekrm in a comment when ready.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot
Copy link
Collaborator

Hi @inteon. Thanks for your PR.

I'm waiting for a jetstack or 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.

@jetstack-bot jetstack-bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 7, 2021
@jakexks
Copy link
Member

jakexks commented Jul 7, 2021

/ok-to-test

@jetstack-bot jetstack-bot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 7, 2021
@inteon inteon force-pushed the helm branch 2 times, most recently from 920ad11 to 768a874 Compare July 7, 2021 13:54
@jetstack-bot jetstack-bot added the area/testing Issues relating to testing label Jul 7, 2021
@inteon inteon force-pushed the helm branch 4 times, most recently from a9a883d to 4017572 Compare July 7, 2021 18:37
@jetstack-bot jetstack-bot requested a review from wallrj July 8, 2021 09:13
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inteon Thanks for looking into this.
There are too many changes here to be merged at once.

Please start by creating a PR specifically for removing the Helm chart labels from the static manifests. (uncontroversial)

And another PR for setting default resource requests (needs discussion)

And although the Helm the components idea may simplify our Bazel build scripts, I do not think it is a good idea to provide such flexibility to our users.
How will we deal with support requests from people who may have installed an incompatible set of components?

@wallrj
Copy link
Member

wallrj commented Jul 11, 2021

@inteon I found helm template --set installCRDs=true --show-only 'templates/crds.yaml' bazel-bin/deploy/charts/cert-manager/cert-manager.tgz.

Could that be used as a way to get only the CRDs without having to put any new logic into the templates?

The following issue is slightly related:

@inteon
Copy link
Member Author

inteon commented Jul 11, 2021

@inteon I found helm template --set installCRDs=true --show-only 'templates/crds.yaml' bazel-bin/deploy/charts/cert-manager/cert-manager.tgz.

Could that be used as a way to get only the CRDs without having to put any new logic into the templates?

The following issue is slightly related:

This cannot be used for helm install, if you look at the implementation, it basically does a regex search on the file name comments in the generated manifest (of all resources) and filters out the "show only" files.
So for the bazel generation, it can be used.
But this will not be possible:

helm install \
  cert-manager-crds jetstack/cert-manager \
  --set components={crd} \
  --version v1.4.0

helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.4.0

Also, you cannot just install eg. webhook + cainjector + crds.
In my opinion, the components property would also be useful for the end-user. Please let me know in case you don't agree; in that case I'll change the logic to use the --show-only option.

Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
@jetstack-bot jetstack-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 13, 2021
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
@jetstack-bot
Copy link
Collaborator

@inteon: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cert-manager-e2e-v1-21 0c82829 link /test pull-cert-manager-e2e-v1-21
pull-cert-manager-bazel 0c82829 link /test pull-cert-manager-bazel

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@jetstack-bot
Copy link
Collaborator

@inteon: 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.

@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 16, 2021
@inteon
Copy link
Member Author

inteon commented Jul 29, 2021

blocked on #4219 and #4209

@jetstack-bot
Copy link
Collaborator

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

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 8, 2021
@jetstack-bot
Copy link
Collaborator

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.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale

@jetstack-bot jetstack-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Dec 8, 2021
@jetstack-bot
Copy link
Collaborator

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

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 8, 2022
@jetstack-bot
Copy link
Collaborator

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.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale

@jetstack-bot jetstack-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 7, 2022
@inteon
Copy link
Member Author

inteon commented Apr 8, 2022

/remove-lifecycle rotten

@jetstack-bot jetstack-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Apr 8, 2022
@jetstack-bot
Copy link
Collaborator

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

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 7, 2022
@inteon
Copy link
Member Author

inteon commented Aug 4, 2022

superseded by #4209 and #5362

@inteon inteon closed this Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy Indicates a PR modifies deployment configuration area/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants