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 chart - lint failure in templates/gatekeeper-controller-manager-poddisruptionbudget.yaml #3527

Closed
cwstrommer opened this issue Sep 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cwstrommer
Copy link

What steps did you take and what happened:

helm pull --repo https://open-policy-agent.github.io/gatekeeper/charts gatekeeper
tar xvzf gatekeeper-3.17.0.tgz
cd gatekeeper
helm lint .

produces

==> Linting .
[ERROR] templates/gatekeeper-controller-manager-poddisruptionbudget.yaml: unable to parse YAML: invalid Yaml document separator: apiVersion: policy/v1

Error: 1 chart(s) linted, 1 chart(s) failed

What did you expect to happen:

No lint error.

Anything else you would like to add:

Changing lines 2 and 3 from

{{- $v1 := .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" -}}
{{- $v1beta1 := .Capabilities.APIVersions.Has "policy/v1beta1/PodDisruptionBudget" -}}

to

{{- $v1 := .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
{{- $v1beta1 := .Capabilities.APIVersions.Has "policy/v1beta1/PodDisruptionBudget" }}

Resolves the linting error.

Environment:

  • Gatekeeper chart version: 3.17.0
  • Helm version: 3.15.4 (also tested 3:13:1)
@JaydipGabani
Copy link
Contributor

@cwstrommer This is fixed in 3.17.1. Please try it out and feel free to open the issue if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants