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

Revisit the different 'Values' types in the CLI install code #3237

Closed
ihcsim opened this issue Aug 12, 2019 · 1 comment · Fixed by #3291
Closed

Revisit the different 'Values' types in the CLI install code #3237

ihcsim opened this issue Aug 12, 2019 · 1 comment · Fixed by #3291

Comments

@ihcsim
Copy link
Contributor

ihcsim commented Aug 12, 2019

Following #3229, the CLI code and Helm library (pkg/charts) added 3 *Values types to capture CLI options and Helm variables. The purpose of this issue is to revisit these types and come up with a clean, reusable interface in the pkg/charts library, so that the CLI and webhook can consume these types.

cmd.installValues - this struct consists of fields that are interpolated in the control plane Helm chart when the user runs the linkerd install command. It consists of both configurable and non-configurable fields. They are primarily primitive types suitable for rendering the Helm templates.

charts.DefaultValues - this struct consists of fields that are mapped directly to the charts/linkerd2/values.yaml and charts/linkerd2/values-ha.yaml files. These default values replaced the previously hard-coded defaults found in the CLI code. Any options provided to the linkerd install command will override these values. They are primarily primitive types suitable for rendering the Helm templates.

charts.Values - this struct consists of fields that correspond to proxy and proxy-init properties that are interpolated in the partials chart. These fields are mainly relevant to proxy injection, depended by the pkg/inject library. This struct is made up of a number of custom types.

@grampelberg grampelberg changed the title (Post 2.5) Revisit the different 'Values' types in the CLI install code Revisit the different 'Values' types in the CLI install code Aug 13, 2019
@ihcsim
Copy link
Contributor Author

ihcsim commented Aug 13, 2019

#3200 introduces a new charts.Chart struct in pkg/charts which can be made more useful for our purpose here. Essentially, we will like install/upgrade being able to tell pkg/charts to load the linkerd2 chart without having to worry about the details around templates, defaults, dependencies, file I/O etc. Conversely, inject should be able to tell pkg/charts to load the patch chart. All the embedded labels and annotations names, and function pointers in the existing cmd.installValues struct can also be moved into the shared library.

@ihcsim ihcsim self-assigned this Aug 19, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant