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

Orchestrator Configmap Override #33

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Conversation

standrewd
Copy link
Contributor

@standrewd standrewd commented Apr 30, 2024

Description
This adds the ability to use a custom configmap instead of the baseConfig and customConfig in the values files. This allows passing in templated values (Ex: {{ printf "{{ env.TEST_ENV_VAR}}" }} ) to the orchestrator without having to do any escaping.

Example of using a custom configmap

useCustomConfigMap: orch-configmap-custom

Example of generating a configmap from a custom config yaml file.
kubectl create configmap orch-configmap-custom --from-file=maverics.yaml=customConfig.yaml

Example customConfig.yaml

version: 0.0.3

logger:
  level: debug

http:
  address: {{ env.MAVERICS_HTTP_ADDRESS}}

Testing
Tested locally using helm template to validate the output is as expected under different scenarios of values.

Scenario 1
useCustomConfigMap defined

useCustomConfigMap: name: orch-configmap-custom

Results in

volumes:
  - name: orchestrator-config
    configMap:
       name: orch-configmap-custom

Scenario 2
customConfig defined

  customConfig:
    version: 0.0.3

    logger:
      level: debug

Results in

volumes:
  - name: orchestrator-config
    configMap:
       name: release-name-orchestrator-config

Scenario 3
No customConfig defined

Results in

volumes:
  - name: orchestrator-config
    configMap:
       name: release-name-orchestrator-config

Documentation
No additional documentation added.

@standrewd standrewd changed the title Feat/orch configmap override Orchestrator Configmap Override Apr 30, 2024
Copy link
Member

@wfernandes wfernandes left a comment

Choose a reason for hiding this comment

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

Let's try and find some time tomorrow to pair on this if possible.

We need to update the values.yaml to document this along with the values schema file.
Also lets add some example values in /example-values along with some documentation on how it should be used. For example, should the config map exist before running helm install?

What happens if we specify multiple sources of orchestrator config?

charts/orchestrator/templates/statefulset.yaml Outdated Show resolved Hide resolved
charts/orchestrator/templates/statefulset.yaml Outdated Show resolved Hide resolved
Copy link
Member

@wfernandes wfernandes left a comment

Choose a reason for hiding this comment

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

Thanks for your work on this @standrewd! lgtm

@standrewd standrewd marked this pull request as ready for review June 7, 2024 19:32
@standrewd standrewd merged commit e29e874 into main Jun 7, 2024
2 checks passed
@standrewd standrewd deleted the feat/orch-configmap-override branch June 7, 2024 19:32
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.

2 participants