gotemplating in helm chart causes errors with Argo CD deployments #922

Open
opened 2025-01-09 10:59:36 +00:00 by jessebot · 2 comments

Hoi and thanks for working on garage!

I wanted to mention that because there is gotemplating in the helm chart's values.yaml, it causes complaints when using it in an Argo CD ApplicationSet, because that already uses gotemplating. GitOps solutions for k8s tend to have this issue, so it's recommended that gotemplating stay within the templates directory. I can submit a PR to move the gotemplating back to a the ConfigMap template and then instead create a parameter to use an existing ConfigMap if people still would like to overwrite the configmap directly.

Kind regards!

Hoi and thanks for working on garage! I wanted to mention that because there is gotemplating in the helm chart's `values.yaml`, it causes complaints when using it in an Argo CD ApplicationSet, because that already uses gotemplating. GitOps solutions for k8s tend to have this issue, so it's recommended that gotemplating stay within the templates directory. I can submit a PR to move the gotemplating back to a the ConfigMap template and then instead create a parameter to use an existing ConfigMap if people still would like to overwrite the configmap directly. Kind regards!
Author

I've added #923

Helm chart updates

  • New helm parameter, garage.existingConfigmap to use an existing ConfigMap for garage.toml:

    garage:
      existingConfigmap: ""
    
  • Added some autogenerated docs using helm-docs. It works by processing every comment that starts with # -- I'm a comment as a description for the parameter it is directly above. This gives a small chart in a README that users can reference in the same directory as the chart.

Changes

  • Replaces garage.garage.toml with garage.garageTomlString. You can still use the old feature like this:

    garage:
      garageTomlString: |-
        myconfig = "somegreatconfig"    
    

    This also moves all the configuration back to the ConfigMap template file so that no GoTemplating happens in the values.yaml itself.

I've added https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/923 **Helm chart updates** - New helm parameter, `garage.existingConfigmap` to use an existing ConfigMap for garage.toml: ```yaml garage: existingConfigmap: "" ``` - Added some autogenerated docs using helm-docs. It works by processing every comment that starts with `# -- I'm a comment` as a description for the parameter it is directly above. This gives a small chart in a README that users can reference in the same directory as the chart. **Changes** - Replaces `garage.garage.toml` with `garage.garageTomlString`. You can still use the old feature like this: ```yaml garage: garageTomlString: |- myconfig = "somegreatconfig" ``` This also moves all the configuration back to the ConfigMap template file so that no GoTemplating happens in the values.yaml itself.
Owner

Nice! I'll take a look at the PR but if there is no breaking changes we should be good to go!

Nice! I'll take a look at the PR but if there is no breaking changes we should be good to go!
maximilien added the
scope
k8s
label 2025-01-09 21:52:17 +00:00
maximilien self-assigned this 2025-01-09 21:52:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#922
No description provided.