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

swctl: added usage condition for entity's extra file #167

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

fgschwan
Copy link
Collaborator

Adds possibility to control creation of extra files from entity based on condition. For example this code will deploy given yaml only for demo deployment (DEMO_DEPLOYMENT is entity input variable)

    files:
      - name: "additional-config-for-demo.yaml"
        when: "${DEMO_DEPLOYMENT}"
        content: |
         ...

The condition is fully-evaluated template (just as entity config) and its content is evaluated (strconv.ParseBool) to find whether to create this file ("when" content is parsed to true boolean) or not ("when" content is parsed to false boolean).

Signed-off-by: Filip Gschwandtner <filip.gschwandtner@pantheon.tech>
@fgschwan fgschwan merged commit ae01f8c into PANTHEONtech:main Jan 15, 2024
4 checks passed
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.

None yet

2 participants