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

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

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

tberreis
Copy link
Contributor

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 helm/helm#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:

@tberreis tberreis requested a review from a team as a code owner August 29, 2024 04:51
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

❗ 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
@@            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 Coverage Δ
unittests 47.99% <ø> (-6.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@JaydipGabani JaydipGabani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for the PR!

PTAL @sozercan @maxsmythe. We will probably need to CP this in 3.17. Also, we should add CI check to prevent this in future,

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to Contributing to Helm Chart for modifying the Helm chart.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the corresponding files. Please have a look.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tberreis you need to remove the changes from charts. The changes will be promoted to the root charts directory the next time a Gatekeeper release is cut. You need to limit the changes to cmd/build/helmify and manifest_staging.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx @JaydipGabani. Done.

…get.yaml

see helm/helm#10149

Signed-off-by: Thomas Berreis <thomas@berreis.de>
@JaydipGabani
Copy link
Contributor

Fixes #3527

Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@JaydipGabani JaydipGabani merged commit 3f45732 into open-policy-agent:master Sep 9, 2024
20 checks passed
JaydipGabani pushed a commit to JaydipGabani/gatekeeper that referenced this pull request Sep 9, 2024
…get.yaml (open-policy-agent#3519)

Signed-off-by: Thomas Berreis <thomas@berreis.de>
Co-authored-by: Jaydipkumar Arvindbhai Gabani <gabanijaydip@gmail.com>
(cherry picked from commit 3f45732)
JaydipGabani added a commit to JaydipGabani/gatekeeper that referenced this pull request Sep 9, 2024
…get.yaml (open-policy-agent#3519)

Signed-off-by: Thomas Berreis <thomas@berreis.de>
Co-authored-by: Jaydipkumar Arvindbhai Gabani <gabanijaydip@gmail.com>
(cherry picked from commit 3f45732)
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
sozercan pushed a commit that referenced this pull request Sep 9, 2024
…get.yaml, cherry-pick (#3519) (#3535)

Signed-off-by: Thomas Berreis <thomas@berreis.de>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Co-authored-by: tberreis <88875030+tberreis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants