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

feat: Add templating functionality to extraContainers #310

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

otherguy
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have bumped the version number in /charts/flagsmith/Chart.yaml in the section version or I'm merging to a
    release branch

Changes

Allow templating in extraContainers, closing #304.

Adjust template logic for extraContainers to support both string and non-string types. Strings are evaluated as templates, similar to extraObjects.

How did you test this code?

Manually.

$ helm template flagsmith --dry-run --debug charts/flagsmith/ -f flagsmith.values.yaml
 # flagsmith.values.yaml

 # ...
 extraContainers: |
    - name: cloud-sql-proxy
      image: {{ $.Values.sqlProxySidecar.image.repository }}:{{ $.Values.sqlProxySidecar.image.tag }}
      imagePullPolicy: IfNotPresent
      command:
        # Start Cloud SQL Proxy
        - /cloud-sql-proxy

        # Add structured logs as JSON
        - --structured-logs
 # ...

Adjust template logic for `extraContainers` across multiple Helm deployment files to support both string and non-string types.
@otherguy otherguy requested a review from a team as a code owner January 22, 2025 10:11
@otherguy otherguy requested review from khvn26 and removed request for a team January 22, 2025 10:11
Copy link
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition — thanks a lot!

@khvn26 khvn26 changed the title Add templating functionality to extraContainers feat: Add templating functionality to extraContainers Jan 22, 2025
@khvn26 khvn26 merged commit 626d6a2 into Flagsmith:main Jan 22, 2025
2 checks passed
@matthewelwell
Copy link
Contributor

@khvn26 does this also need documentation updates?

@khvn26
Copy link
Member

khvn26 commented Jan 22, 2025

@matthewelwell Both extraContainers and extraVolumes need to be added to docs, as well as extraObjects.

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

Successfully merging this pull request may close these issues.

Make extraContainers also support templates, similar to extraObjects
3 participants