helm-microservices-example icon indicating copy to clipboard operation
helm-microservices-example copied to clipboard

Dry on Dry

Open brunohms opened this issue 6 years ago • 0 comments

I've noticed that in some use cases the following code will be used in multiple files:

{{- $common := dict "Values" .Values.common -}} 
{{- $noCommon := omit .Values "common" -}} 
{{- $overrides := dict "Values" $noCommon -}} 
{{- $noValues := omit . "Values" -}} 
{{- with merge $noValues $overrides $common -}}

In your git repo I can see it in _deployment and almost the same in _ingress

Is it possible to move it to the _helpers.tpl file and reuse it?

Tried doing it using files without any success.

brunohms avatar Feb 26 '19 14:02 brunohms