open-policy-agent / gatekeeper

🐊 Gatekeeper - Policy Controller for Kubernetes
https://open-policy-agent.github.io/gatekeeper/
Apache License 2.0
3.73k stars 765 forks source link

fix: liniting error in gatekeeper-controller-manager-poddisruptionbudget.yaml #3519

Closed tberreis closed 2 months ago

tberreis commented 3 months ago

With v3.17.0 the separator --- has been added to a lot of templates. For the gatekeeper-controller-manager-poddisruptionbudget.yaml it unfortunately breaks the helm linting:

[root gatekeeper git:(master =)]# helm lint
==> 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

[root gatekeeper git:(master =)]# git checkout v3.17.0
HEAD is now at d01aa68f4 chore: Prepare v3.17.0 release (#3509)
[root gatekeeper git:((v3.17.0))]# helm lint
==> 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

[root gatekeeper git:((v3.17.0))]# git checkout v3.16.3
Previous HEAD position was d01aa68f4 chore: Prepare v3.17.0 release (#3509)
HEAD is now at a08c83dd2 chore: Prepare v3.16.3 release (#3401)
[root gatekeeper git:((v3.16.3))]# helm lint
==> Linting .

1 chart(s) linted, 0 chart(s) failed

For details please see https://github.com/helm/helm/issues/10149.

What this PR does / why we need it:

This PR fixes the linting error. The rendered chart remains untouched.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged): Fixes #

Special notes for your reviewer:

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 47.99%. Comparing base (3350319) to head (e361410). Report is 158 commits behind head on master.

:exclamation: There is a different number of reports uploaded between BASE (3350319) and HEAD (e361410). Click for more details.

HEAD has 1 upload less than BASE | Flag | BASE (3350319) | HEAD (e361410) | |------|------|------| |unittests|2|1|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3519 +/- ## ========================================== - Coverage 54.49% 47.99% -6.51% ========================================== Files 134 219 +85 Lines 12329 15169 +2840 ========================================== + Hits 6719 7280 +561 - Misses 5116 7072 +1956 - Partials 494 817 +323 ``` | [Flag](https://app.codecov.io/gh/open-policy-agent/gatekeeper/pull/3519/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-policy-agent) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/open-policy-agent/gatekeeper/pull/3519/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-policy-agent) | `47.99% <ø> (-6.51%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-policy-agent#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

JaydipGabani commented 2 months ago

Fixes #3527