Could anybody please help me understand this command - What would be the output of this key -value pair:
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain | quote }}
where
common.names.fullname: ""
common.names.namespace: ""
clusterDomain: cluster.local
This piece of code is from here: https://github.com/bitnami/charts/blob/main/bitnami/keycloak/templates/configmap-env-vars.yaml
I am fairly new to Kubernetes and I am trying to understand what would be the value of JAVA_OPTS_APPEND.
Thanks in advance. Nafee
You can render helm templates locally with
helm templatecommand, this will render your values so you see the outputs of this command.If you don't enough permissions on your Kubernetes cluster, you can spin a local
mininkubeorkindinstance and then render the template:In the rendered manifest you will find the following ConfigMap:
Now note that
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain | quote }}rendered:And that was done with
printffunction which renderedcommon.names.fullnameandcommon.names.namespaccefrom the templates helpers which are defined in the "parent" chart:and
TLDR;
It is taking the Chart, Release names as defaults. And if you want to override them have a look at the documentation: https://github.com/bitnami/charts/tree/main/bitnami/keycloak#common-parameters, or the templates :), and just set:
Other examples
Result:
Result: