-
Notifications
You must be signed in to change notification settings - Fork 202
#1732 - Resolving template placeholders only in kubernetes.yaml but not individual template files (which will be resolved by helm mojo) #1733
Conversation
…t individual template files (which will be resolved by helm mojo)
@@ -656,13 +656,6 @@ private void resolveTemplateVariablesIfAny(KubernetesList resources) throws Mojo | |||
} | |||
File kubernetesYaml = new File(this.targetDir, "kubernetes.yml"); | |||
resolveTemplateVariables(parameters, kubernetesYaml); | |||
File kubernetesResourceDir = new File(this.targetDir, "kubernetes"); |
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.
Could you please elaborate on how this fixes #1732
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.
oh, so we were resolving placeholders in template files also.
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.
Those lines were replacing template placeholders in kubernetes resource files with concrete values specified in template.yaml file. The placeholders need to be resolved only in kubernetes.yml in order to be able to do fabric8:deploy or fabric8:apply, but they don't need to be resolved in individual kubernetes resource files as they will be needed in HelmMojo execution.
The HelmMojo is using those same kubernetes resources to create chart, but since the placeholders were already replaced with concrete values from template.yaml, it can not replace them with corresponding .Values.xxx
placeholders.
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.
Easiest is to build spring-boot-with-yaml sample on this branch with fabric8:helm goal and inspect generated helm chart
…ividual template files (which will be resolved by helm mojo) + HELM mode does not support parameters without value Ported PR fabric8io/fabric8-maven-plugin#1713 Ported PR fabric8io/fabric8-maven-plugin#1733
…ividual template files (which will be resolved by helm mojo) + HELM mode does not support parameters without value Ported PR fabric8io/fabric8-maven-plugin#1713 Ported PR fabric8io/fabric8-maven-plugin#1733
Fix #1732