-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Simplify Config Templating #8685
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
Conversation
| log: | ||
| stdout: true | ||
| level: {{ default .Env.LOG_LEVEL "info" }} | ||
| level: {{ default "info" (env "LOG_LEVEL") }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is worth looking at. (Hidden by Github do to the large number of changes)
common/config/config_test.go
Outdated
|
|
||
| func TestEmbeddedTemplateOnlyDiffersFromDockerByComment(t *testing.T) { | ||
| embeddedContent, err := os.ReadFile("config_template_embedded.yaml") | ||
| func TestEmbeddedTemplateConsistentWithDockerTemplate(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| func TestEmbeddedTemplateConsistentWithDockerTemplate(t *testing.T) { | |
| func TestEmbeddedTemplateConsistentWithDockerTemplate(t *testing.T) { |
this test in no longer relevant since there's a syntax different between the 2 files. docker-builds still expects the dockerize syntax.
|
|
||
| var rendered bytes.Buffer | ||
| err = tpl.Execute(&rendered, ctx) | ||
| err = tpl.Execute(&rendered, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to pass in the environment as context
| and [base-builder](https://github.com/temporalio/docker-builds/blob/main/docker/base-images/base-builder.Dockerfile)~~ | ||
| **Note:** The docker-builds repository is now deprecated and will be archived. | ||
| <!-- TODO: Remove docker/config_template.yaml after temporalio/docker-builds repository is archived --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note is already in the file and this does not render.
What changed?
dockerizesyntax. Now we just supportsprigWhy?
Simplification
How did you test it?
Potential risks
Existing config templates will need to be updated to use
sprigonly syntax. Otherwise the server will not be able to read it.