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 external Helm templates #87

Closed
pjgg opened this issue Sep 19, 2022 · 1 comment · Fixed by #102
Closed

Allow external Helm templates #87

pjgg opened this issue Sep 19, 2022 · 1 comment · Fixed by #102
Labels
enhancement New feature or request

Comments

@pjgg
Copy link

pjgg commented Sep 19, 2022

As an end user, I would like to provide my own templates.

At the of the day each company has its own K8s cluster configuration. Some of them have Istio and need deployments with two containers per "deployment", others could have Prometheus and need to add some extra labels to the deployments etc... Currently, I could not find a way to use my own templates based on the generated values.yaml in order to generate my company required k8s.yamls

Note that the values.yaml doesn't have any meaning by themselves, are the templates that give meaning to every values field. So, for example, a developer could set a String in a field that should be an Integer because are the templates that will handle this String and convert it into an Integer based on some custom logic.

For example

Values.yaml

volumePermissions:
      securityContext:
        runAsUser: "auto"

custom template

 {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
              chown `id -u`:`id -G | cut -d " " -f2` {{ .Values.primary.persistence.mountPath }}

...and at the end are the templates that will set the right value to this field according to the company's needs.

@Sgitario
Copy link
Contributor

I really like this idea +1

@Sgitario Sgitario added the enhancement New feature or request label Sep 21, 2022
Sgitario added a commit that referenced this issue Oct 4, 2022
Sgitario added a commit that referenced this issue Oct 4, 2022
Sgitario added a commit that referenced this issue Oct 4, 2022
@Sgitario Sgitario added this to the 1.0.0 milestone Oct 4, 2022
Sgitario added a commit to Sgitario/dekorate that referenced this issue Oct 4, 2022
iocanel pushed a commit to dekorateio/dekorate that referenced this issue Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants