Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/nginx-ingress-controller] loadBalancerSourceRanges list rendering is broken in latest chart #14439

Closed
samling opened this issue Jan 19, 2023 · 2 comments · Fixed by #14455
Assignees
Labels
nginx-ingress-controller solved tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@samling
Copy link
Contributor

samling commented Jan 19, 2023

Name and Version

bitnami/nginx-ingress-controller 9.3.25

What steps will reproduce the bug?

I have a list of source IPs defined in my values.yaml, shown below as an example of the format.

Previously this list was rendered via toYaml and appeared in the rendered manifest the same as it appears in the values file. However, at some point between versions 9.1.5 and at least 9.3.18, the template for loadBalancerSourceRanges changed from:

  {{- if .Values.service.loadBalancerSourceRanges }}
  loadBalancerSourceRanges: {{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }}
  {{- end }}

to

  {{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerSourceRanges)) }}
  loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
  {{- end }}

This causes the list to render as:

  loadBalancerSourceRanges: [1.2.3.4/30 2.3.4.5/30]

which is invalid and breaks the deployment. The workaround at the moment is to define a single list item with a string of comma-separated values:

nginx-ingress-controller:
  service:
    loadBalancerSourceRanges:
    - "1.2.3.4/30, 2.3.4.5/30"

This renders properly.

Are you using any custom parameters or values?

nginx-ingress-controller:
  service:
    loadBalancerSourceRanges:
    - "1.2.3.4/30"
    - "2.3.4.5/30"

What is the expected behavior?

Final service resource is rendered with the correct list format:

nginx-ingress-controller:
  service:
    loadBalancerSourceRanges:
    - "1.2.3.4/30"
    - "2.3.4.5/30"

What do you see instead?

An invalid format of list items is rendered instead:

  loadBalancerSourceRanges: [1.2.3.4/30 2.3.4.5/30]
@samling samling added the tech-issues The user has a technical issue about an application label Jan 19, 2023
@samling samling changed the title loadBalancerSourceRanges list rendering is broken in latest chart [bitnami/nginx] loadBalancerSourceRanges list rendering is broken in latest chart Jan 19, 2023
@github-actions github-actions bot added the triage Triage is needed label Jan 19, 2023
@samling samling changed the title [bitnami/nginx] loadBalancerSourceRanges list rendering is broken in latest chart [bitnami/nginx-ingress-controller] loadBalancerSourceRanges list rendering is broken in latest chart Jan 19, 2023
@carrodher
Copy link
Member

Thanks for reporting this issue. Would you like to contribute by creating a PR to solve the issue? The Bitnami team will be happy to review it and provide feedback. Here you can find the contributing guidelines.

@samling
Copy link
Contributor Author

samling commented Jan 19, 2023

@carrodher Of course! I'll submit something later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nginx-ingress-controller solved tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
2 participants