-
Notifications
You must be signed in to change notification settings - Fork 208
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
Use helm charts to generate manifests #717
Conversation
🚀
(Had some issues checking out the PR, and browser complains about 1k files changed in the PR. ) For cgroup2 fs mounting, we need to add version checks. You can use this PR as a reference - https://github.com/cilium/cilium-cli/pull/627/files. |
@aditighag why? Isn't that logic already versioned in the helm chart? |
Version checks are not required in the cilium oss helm charts because we added the flags in the same version as the program that mounts cgroup2 fs. |
@aditighag and the same is enforced in the cilium-cli with this PR. If the user installs version 1.x.y the helm chart that will be used is 1.x.y |
This change is incredibly large, so I can't really tell for sure, but it feels like this moves the CLI towards a model where it's mostly a 'thin' Helm wrapper. Will this impact our ability to perform 'smart' logic based on certain properties of the target cluster? What about the maintenance cost of making sure the CLI stays compatible with past and future charts? This effectively turns the Helm values file into an API contract, unless the intention was to put that burden on the user by introducing I'm not sure if the mandatory use of The nice thing about having flags declared by the CLI itself was that |
Not really, that logic still lives inside cilium-cli. This PR is simply removing the duplicated logic and manifests that already existed in helm and use that instead to generate them.
The CLI is still in experimental stage. Whatever compatibility we offer with helm will be used in the CLI
We briefly discussed that in the community meeting and it doesn't makes sense to keep the CLI flags if only half of them exist based on developer demand. It also doesn't make sense to keep a 1:1 mapping of a CLI flag to an existing helm flag. The flags are now marked as deprecated and the order of priority is:
Explained above.
I've deprecated all flags that have a 1:1 mapping to the helm flag. There are certain CLI flags that have a 1 to many helm options. I've left those for now. |
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 am OK with the PR in its current state. We still have work to do and I largely share the same concerns as already expressed (re: user-side confusion, ease of use) but we can iterate on that.
I don't agree that having a 1:1 mapping of CLI flag to helm flags is bad. Flags in cilium-cli are discoverable, and provide help text, and validation that flags via I also agree with @ti-mo overall pushing users towards |
To me it’s still not clear whether all concerns re. deprecating flags have been addressed. Unfortunately, the discussion is split across this PR, the 2022-03-09 community meeting and a private slack thread and I’ve lost track a bit. How about we leave the deprecation of the flags out of this PR for now and open a separate PR for that, so it can be reviewed and discussed more easily? Regarding the above point: While testing again, I also noticed that we use some of the deprecated flags in our v1.10 and v1.11 getting started guides (e.g. |
Instead of hard-coding all manifests into Cilium-cli, we should use the helm tgz available from the official Cilium chart repository. This will prevent files from being out-of-sync as well as prevent developer's confusion on which installation method it should be used. Signed-off-by: André Martins <[email protected]>
Since cilium-cli uses helm as basis to deploy Cilium, we can also pass a helm directory in case the version that we want to install is not released in the official helm chart repository. Signed-off-by: André Martins <[email protected]>
This commit will allow users to pass user-defined helm options into cilium-cli. The use-case for it is to be able to use unreleased helm flags in the cilium-cli. Signed-off-by: André Martins <[email protected]>
Signed-off-by: André Martins <[email protected]>
With this option, users will be able to store the auto-generated helm values into a specific file. Signed-off-by: André Martins <[email protected]>
In order to keep the cilium-cli options set by the user we should store it as part of a special key in Cilium's ConfigMap. This will allow cilium-cli to know the intent from the user for the current cluster installation without requiring to set helm flags every time the user interacts with the cluster via cilium-cli. Signed-off-by: André Martins <[email protected]>
@tklauser I've dropped the last 2 commits from the PR. I'll create a new PR with them once this is merged. Thanks |
The commits deprecating the existing flags have been moved out of this PR. Several reviewers approved and judging from the review comments and offline discussion we seem to agree on the remaining changes. Thus merging this PR, thanks a lot for your patience @aanm! |
Instead of hard-coding all manifests into Cilium-cli, we should use the helm tgz available from the official Cilium chart repository. This will prevent files from being out-of-sync as well as prevent developer's confusion on which installation method it should be used.
Note to reviewers: there is some future work that can be done which is to store the helm "set" options into Cilium's ConfigMap (edit: implemented in this PR). With this, cilium-cli will know the helm settings used to deploy the Cilium which will allow commands such as
cilium hubble enable
without requiring to pass--set
with all the helm options. Currently, commands such ascilium hubble enable
are still using hardcoded manifests (edit: Still not done).Fixes #256