Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Unable to create if else condition in config #167

Open
edaena opened this issue Apr 26, 2019 · 0 comments
Open

Unable to create if else condition in config #167

edaena opened this issue Apr 26, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@edaena
Copy link
Contributor

edaena commented Apr 26, 2019

Describe the bug:
Unable to create if else condition in config.

To Reproduce:
Add an if condition like the one in the selector below:

apiVersion: v1
kind: Service
metadata:
  name: {{ .Values.appName }}-svc-stage
spec:
  type: ClusterIP
  selector:
    app: {{ .Values.appName }}
    {{- if eq .Values.productionSlot "blue" }}
    slot: green
    {{- else }}
    slot: blue
    {{- end }}

Expected behavior:
The correct files are generated

Seen:

ERRO[26-04-2019 15:13:14] helm template failed with: Error: render error in "service-chart/templates/service-stage.yaml": template: service-chart/templates/service-stage.yaml:9:11: executing "service-chart/templates/service-stage.yaml" at <eq .Values.productio...>: error calling eq: invalid type for comparison

Additional context:
Bug encountered as part of the work to enable blue-green deployment for project jackson: project-jackson/service-stage.yaml

@edaena edaena added the bug Something isn't working label Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant