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

Helm template rendering error when specifying both bgp.enabled and operator.resources #16272

Closed
rkage opened this issue May 21, 2021 · 1 comment · Fixed by #16273
Closed
Assignees
Labels
area/helm Impacts helm charts and user deployment experience kind/bug This is a bug in the Cilium logic. kind/community-report This was reported by a user in the Cilium community, eg via Slack.

Comments

@rkage
Copy link
Contributor

rkage commented May 21, 2021

Bug report

General Information

  • Cilium version: 1.10.0
  • Kernel version: 5.11.0-1008-raspi
  • Orchestration system version in use: kubectl/1.21.1, helm/3.5.4

How to reproduce the issue

  1. Create a values.yaml file with the following contents:
operator:
  resources:
    requests:
      cpu: 100m
      memory: 256Mi
    limits:
      cpu: 200m
      memory: 384Mi

bgp:
  enabled: true
  announce:
    loadbalancerIP: true
  1. helm install cilium cilium/cilium -f values.yaml

Error reported by helm:
YAML parse error on cilium/templates/cilium-operator-deployment.yaml: error converting YAML to JSON: yaml: line 92: did not find expected key

It appears the lines 231-239 of the cilium-operator-deployment.yaml file are out of order;

{{- if .Values.operator.resources }}
resources:
{{- toYaml .Values.operator.resources | trim | nindent 10 }}
{{- end }}
{{- if .Values.bgp.enabled }}
- mountPath: /var/lib/cilium/bgp
name: bgp-config-path
readOnly: true
{{- end }}

The {{- if .Values.bgp.enabled }} block should be moved above the {{- if .Values.operator.resources }} block.

@rkage rkage added the kind/bug This is a bug in the Cilium logic. label May 21, 2021
@pchaigno pchaigno added the area/helm Impacts helm charts and user deployment experience label May 21, 2021
@pchaigno
Copy link
Member

pchaigno commented May 21, 2021

I see you already have a commit ready to fix this so I've assigned you. Please tell me if I'm assuming incorrectly.

EDIT: And even a PR now 🚀

@pchaigno pchaigno added kind/community-report This was reported by a user in the Cilium community, eg via Slack. needs-backport/1.10 labels May 21, 2021
nathanjsweet pushed a commit that referenced this issue Jun 2, 2021
fixes #16272

Signed-off-by: Nick M <4718+rkage@users.noreply.github.com>
pchaigno pushed a commit to pchaigno/cilium that referenced this issue Jun 4, 2021
[ upstream commit d31f029 ]

fixes cilium#16272

Signed-off-by: Nick M <4718+rkage@users.noreply.github.com>
Signed-off-by: Paul Chaignon <paul@cilium.io>
aanm pushed a commit that referenced this issue Jun 7, 2021
[ upstream commit d31f029 ]

fixes #16272

Signed-off-by: Nick M <4718+rkage@users.noreply.github.com>
Signed-off-by: Paul Chaignon <paul@cilium.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Impacts helm charts and user deployment experience kind/bug This is a bug in the Cilium logic. kind/community-report This was reported by a user in the Cilium community, eg via Slack.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants