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

Allow more configuration to be customised #59

Open
smitthakkar96 opened this issue Nov 24, 2022 · 2 comments
Open

Allow more configuration to be customised #59

smitthakkar96 opened this issue Nov 24, 2022 · 2 comments

Comments

@smitthakkar96
Copy link

smitthakkar96 commented Nov 24, 2022

The generated helm chart should allow changing things like:

  • annotations
  • nodeSelector
  • affinity rules
  • etc

It would be great if we could support a config file where the user can specify schema/attribute name and field-ref/s and helmify will automatically templatize it.

Example:

vars:
- name: annotations
  optional: true
  objref:
    kind: Deployment
    group: apps
    version: v1
    name: xyz
  fieldrefs:
    - fieldpath: spec.template.metadata.annotation

PS: If this the community and maintainers are interested in I am happy to contribute

@arttor
Copy link
Owner

arttor commented Nov 26, 2022

@smitthakkar96 great idea!
Such config will enable users to easily adjust helmify to other use-cases.

Let's discuss specs first. Maybe we can reuse the config to implement 57 and 54.

My first question is about optional: true/false values. For optional: false helmify must templatize it but what happens for optional: true? Maybe we can rename it to enabled: so users will be able to override default behavior to force template or force skip property?

What is name: annotations property? Is it a human-readable alias for config which will be ignored by helmify?

PS:
I just started thinking of how it can be integrated into the codebase and it looks very painful. Because existing code is just a go script transforming kubebuilder output into helm 😄.
I think we should revisit helmify code and list all currently templated fields as a default config. Then we can rewrite code into a single generic yaml processor taking config and manifest as input and producing a template.
The only problem is maintaining templated object links inside the chart (ex: deployment->volume, deployment->configmap, etc.).
Do you have any thoughts about implementation?

@RealAnna
Copy link
Contributor

Hi @smitthakkar96 and @arttor, for nodeSelector I proposed a simple solution here #77
what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants