Skip to content

diff not showing changes with values that contain # (hash) #757

@LeonD9

Description

@LeonD9

Hey,
when running helmfile diff command on values.yaml that look like this:

ingress:
  rules:
  - host: test
    paths:
    - path: /example
      backend:
        actions:
          type: redirect
          redirectConfig:
            host: example.com
            path: '/#{path}'
            port: '443'
            protocol: HTTPS
            query: '#{query}'
            statusCode: HTTP_302

while using this template:

    {{- range $rule := .Values.ingress.rules }}
    {{- $index := 0 }}
    {{- range $path := $rule.paths }}
    {{- if or .backend.actions .backend.conditions }}
    {{- $index = add $index 1 }}
    {{- end }}
    {{- if $path.backend.actions }}
    alb.ingress.kubernetes.io/actions.rule-{{ $index }}: {{ $path.backend.actions | toJson | squote }}
    {{- end }}
    {{- if $path.backend.conditions }}
    alb.ingress.kubernetes.io/conditions.rule-{{ $index }}: {{ $path.backend.conditions | toJson | squote }}
    {{- end }}
    {{- end }}
    {{- end }}

I don't see the diff, but when running helmfile template i do see the changes being applied and also after running helmfile apply the changes were applied, they look like this from the template run:

    alb.ingress.kubernetes.io/actions.rule-3: '{"redirectConfig":{"host":"example.com","path":"/#{path}","port":"443","protocol":"HTTPS","query":"#{query}"},"type":"redirect"}'

when i change query and path values to not include # i am able to see the diff which means that for some reason # is ignored in diff run.
is this a bug? or its intended to ignore values that contain # (hash)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions