My company it is using on their build process sbt-native-packager, which adds labels on docker images, those labels contains useful information (port number, service types, application name etc...).
I want to read those values and use them on Kubernetes Helm charts, is there any way to access those label values using go templates on helm charts?
There are some steps you can do in order to get these variables to chart:
Extract desired labels in separate environment variables
PORT_NUMBER=$(command --to --extract --port)
Set placeholders in your values.yaml file
values.yaml
image:
port: "$PORT_NUMBER"
pullPolicy: IfNotPresent