-
Notifications
You must be signed in to change notification settings - Fork 347
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
feat(installation): add helm support #651
Conversation
c099482
to
93dbb2c
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #651 +/- ##
==========================================
- Coverage 64.32% 63.63% -0.69%
==========================================
Files 70 71 +1
Lines 9134 9220 +86
==========================================
- Hits 5875 5867 -8
- Misses 2855 2948 +93
- Partials 404 405 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@Xunzhuo what release automation are you planning on using? |
f063512
to
c76c71d
Compare
@stevehipwell I think we can use https://github.com/helm/chart-releaser. |
@Xunzhuo were you thinking of using this via GH actions? If so I'd suggest a pattern like is used by ExternalDNS. Basically chart changes can be added and tested at any point in the lifecycle, with the chart being released based on a change to Chart.yaml on the |
Thank you @stevehipwell! I will take a look:) |
cc: @bmetzdorf |
charts/eg/templates/certgen.yaml
Outdated
- command: | ||
- envoy-gateway | ||
- certgen | ||
image: docker.io/envoyproxy/gateway-dev:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be templated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest templating it from the chart app version field.
@Xunzhuo This was fast, wow! I'm very new to this effort here. So, please accept my apologies for my ignorance. My understanding is that we generate the current install.yaml via a combination of the "official" gatewayapi-crds.yaml and running kustomize in various directories under /internal. My question is: How can we keep that existing mechanism and this helm chart code in sync? (It is not obvious to me how you created this helm chart). Can we use the existing mechanism to create the helm chart (e.g. convert install.yaml to a helm chart) or can we retire the old mechanism and generate install.yaml from the helm chart? But maybe I'm just missing something here.. |
@bmetzdorf Helm charts tend to be hand crafted to some degree as they're effectively another application with a dependency on the primary application. You could generate your manifests with |
@stevehipwell Committing into this repo here makes total sense. My question is: How can we make sure that the already existing yaml and the helm chart don't drift? Manual diffing seems cumbersome and error prone. Is there any tooling that can help? |
@bmetzdorf you could add an automated check as part of the chart change PR workflow (or maybe release workflow to allow parallel work) to compare the chart output with fixed values to the manifests. Logically the Helm chart would be based on the manifests, but able to support a wider target (e.g. K8s version detection for API versions) and extended functionality (e.g. ServiceMonitor). |
Thanks for your comments @stevehipwell @bmetzdorf! Since this PR is still a WIP state, I will address these comments soon. |
@Xunzhuo if you let me know when you're done I can do a full review? |
Sure, thanks @stevehipwell |
We were considering dropping Kustomize. See #479 for additional details. |
fa6f809
to
b7789ad
Compare
Main part of #1072, except refactoring github workflows/automation. cc @arkodg @stevehipwell PTAL, thanks. |
Signed-off-by: bitliu <bitliu@tencent.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had a chance to review properly, I will have a detailed review on Monday, but a couple of things jumped out at me. Firstly CRDs should be in a crd
folder in the root of the chart and should probably be manually curated to remove generation artifacts which shouldn't be included. Secondly why is there a generated folder for RBAC in the templates? And finally a question, is there any chart release automation or is this still pending?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think it looks good, but I have a nit about the installation instructions namespace.
@stevehipwell doing it this way with the CRDs is actually preferable since Helm will not update CRDs on a I understand helm's concerns for why they handle things this way, but from my perspective, we should manage this on our side and help provide users with a migration guide should Gateway API release breaking changes rather than let users upgrade assuming their CRDs are being kept up-to-date. |
@AliceProxy going to have to strongly disagree with you on this, "works" in this case is only if you squint and look to the side. If you want to manage CRDs with Helm (I have no idea why you would) a separate chart is idiomatic, either basic templates or job based. I'm not going to rehash all of the arguments for this here, the Helm docs and a simple Google search should suffice. But as a case in point if the CRDs in are the chart (or directly linked to the chart) you will lose all resources if you uninstall, which for a stateless component makes zero sense. |
I think putting gwapi crds into
Rbac and crds are both generated by https://github.com/envoyproxy/gateway/blob/main/tools/make/kube.mk#L28
It will add after this PR. |
Yes I think you're definitely right here. I didn't consider how the CRDs being removed on an uninstall would be very undesirable for use-cases such as multitenant environments or setups where you may be managing more than one instance of Envoy Gateway per-cluster and would absolutely not want all your CRDs getting deleted when you
I don't personally mind the method I mentioned where the CRDs are not part of any chart and users are required to apply them directly from yaml, but over the course of the various Emissary versions we've received many requests from users to add helm support for the CRDs so that they can manage all their cluster config with tools like helm. The main driver for this request is that many users seem to be working in an environment where they are unable to apply yaml to the cluster from manifests either because of business restrictions or the tooling they use to manage cluster config. While I think it seems strange that users would be unable to find a suitable workaround to that problem, it has been a point of friction that we frequently get nagged about by some of our larger enterprise users. As for putting the CRDs in helm's I think using the |
Hey @AliceProxy, thanks for comments! I think putting them into For the generated EG CRDs, what do you think? Also putting them into |
For multi-tenant or multi-instance of EG, I think we should also put them into I have put all crds into |
It's always best to follow idioms, especially with something as ubiquitous as Helm; I'd suspect that your many support requests are a vocal minority of actual users. Chart CRDs should be in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Resolves: #650
Resolves: #479
xref: #1072
Signed-off-by: bitliu bitliu@tencent.com