How do I make it so that Kubernetes replaces \$(ENV) with the runtime value of the ENV environment variable when the container is started?
//build.gradle.kts
jib {
from.image = "prom/prometheus"
to {
image = "${dockerRepository}/${project.name}:${project.version}"
}
container {
ports = listOf("8080")
environment = mapOf(
"FOO" to "BAR"
)
entrypoint = listOf("INHERIT")
args = listOf(
"--enable-feature=agent",
"--config.file=/etc/prometheus/\$(ENV)/prometheus.yml",
"--web.console.libraries=/usr/share/prometheus/console_libraries",
"--web.console.templates=/usr/share/prometheus/consoles",
"--web.listen-address=0.0.0.0:8080",
)
}
}