Skip to content

Helm charts generate invalid YAML for collaboration API / WS #890

@bmcgavin

Description

@bmcgavin

Bug Report

Problematic behavior
Helm charts provide invalid YAML in kubernetes >=1.19 due to duplication of service blocks in ingress_collaboration_api and ingress_collaboration_ws templates.

Expected behavior/code
Helm can install the chart

Steps to Reproduce

  1. attempt to install via helm on kubernetes >=1.19

Environment

  • Kubernetes version: >=1.19

Possible Solution
This pattern is used throughout the helm templates:

             backend:
              {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
              service:
                name: {{ include "impress.backend.fullname" . }}
                port:
                  number: {{ .Values.backend.service.port }}
              {{- else }}
              serviceName: {{ include "impress.backend.fullname" . }}
              servicePort: {{ .Values.backend.service.port }}
            {{- end }}

Only in two services referenced there is an extra service block outside of the if:

            backend:
              service:
                name: {{ include "impress.yProvider.fullname" . }}
                port:
                  number: {{ .Values.yProvider.service.port }}
              {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
              service:
                name: {{ include "impress.yProvider.fullname" . }}
                port:
                  number: {{ .Values.yProvider.service.port }}
              {{- else }}
              serviceName: {{ include "impress.yProvider.fullname" . }}
              servicePort: {{ .Values.yProvider.service.port }}
            {{- end }}

I'll make a PR removing this extra service block.

Additional context/Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions