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

Remove duplication of backend config #1627

Open
ztefanie opened this issue Sep 10, 2024 · 2 comments
Open

Remove duplication of backend config #1627

ztefanie opened this issue Sep 10, 2024 · 2 comments
Labels
CI/CD discussion-needed We need to resolve the questions in the issue.

Comments

@ztefanie
Copy link
Member

Issue: Currently, any changes made in config.yaml in our GitHub repository also require manual updates in the Salt .sls files, leading to redundant work and potential inconsistencies.

possible solutions:

  1. Automate the synchronization of config.yaml using a CI/CD pipeline. This can be set up so that any changes in the GitHub repository are automatically reflected in Salt Pillar or the .sls files, eliminating the need for manual updates.

Alternative Solutions:

  1. Use Jinja templating in SaltStack to dynamically reference values from config.yaml. e.g.
{% set config = salt['pillar.get']('config') %}

entitlementcard:
  projects:
    {% for project in config.projects %}
    {{ project.id }}:
      print-office-domain: {{ project.id }}
      {% for key, value in project.items() %}
      {{ key }}: {{ value }}
      {% endfor %}
    {% endfor %}
  1. Store config.yaml in Salt Pillar and reference it directly in Salt states.

  2. Use external YAML file inclusion to pull config.yaml into Salt.

@ztefanie ztefanie added discussion-needed We need to resolve the questions in the issue. CI/CD labels Sep 10, 2024
@ztefanie ztefanie mentioned this issue Sep 10, 2024
@f1sh1918
Copy link
Contributor

f1sh1918 commented Oct 7, 2024

We decided on 2)
We have to create a ticket for sven in open project @ztefanie

@ztefanie
Copy link
Member Author

ztefanie commented Oct 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD discussion-needed We need to resolve the questions in the issue.
Projects
Status: No status
Status: No status
Development

No branches or pull requests

2 participants