-
Notifications
You must be signed in to change notification settings - Fork 207
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
Rendering the application version in the helm chart #6390
Comments
Поддерживаю шаблонизацию Chart.yaml и values.yaml, а также доступ из шаблонов к файлам вне проекта Helm |
I'm going to implement this feature, but would prefer to discuss some questions before getting started. @alexey-igrychev is it handy to be able to read the app version from a dedicated file or it is fine to have it only in the werf.yaml? If reading version from an external file is desired, what file formats should we consider? Basically we can support everything, but a lot of options is not always good. With the external version file support I see the following scenarios:
---
version: "0.0.1"
... |
Implements werf#6390 The current implementation scope: * Add `applicationVersion` global param support to `werf.yml` * Add `applicationVersionFile` global param support to `werf.yml` * Plain/text, JSON, YAML files can be used as `applicationVersionFile` params * Giterminism is enforced for `applicationVersionFile` param * Gitemenis dev mode is supported for `applicationVersionFile` param * Handle corner case when both `applicationVersion` and `applicationVersionFile` params are set * `applicationVersion` value is available in nelm templates by using `$.Values.werf.applicationVersion` variable `werf.yaml` file content: ``` project: demo-app configVersion: 1 applicationVersion: v0.0.1 --- image: backend dockerfile: backend.Dockerfile --- image: frontend dockerfile: frontend.Dockerfile ``` `werf.yaml` file content: ``` project: demo-app configVersion: 1 applicationVersionFile: ./version.json --- image: backend dockerfile: backend.Dockerfile --- image: frontend dockerfile: frontend.Dockerfile ``` `./version.json` file content: ``` { "version": "v0.0.1" } ``` `werf.yaml` file content: ``` project: demo-app configVersion: 1 applicationVersionFile: ./version.yaml --- image: backend dockerfile: backend.Dockerfile --- image: frontend dockerfile: frontend.Dockerfile ``` `./version.yaml` file content: ``` version: v0.0.1 ``` `werf.yaml` file content: ``` project: demo-app configVersion: 1 applicationVersionFile: ./version --- image: backend dockerfile: backend.Dockerfile --- image: frontend dockerfile: frontend.Dockerfile ``` `./version` file content: ``` v0.0.1 ```
Implements werf#6390 Signed-off-by: Ilya Drey <[email protected]>
solved |
Implements #6390 Signed-off-by: Ilya Drey <[email protected]>
Before proceeding
Problem
The project maintains the value of the application version. The value can be read from a file in the root of the project. This value must be assigned to the application deployment labels. At the moment, it is possible to set only in Chart.yaml. This option is not useful.
Solution (if you have one)
It is proposed to make it possible to template Chart.yaml with access to files in the root of the project (not in the Helm folder of the chart) or to set a parameter in templating werf.yaml with subsequent templating of the Deployment manifest.
Additional information
No response
The text was updated successfully, but these errors were encountered: