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: helm warning when setting NetworkPolicy ingress rule(s) #3541

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

sebastian-stephan
Copy link
Contributor

What this PR does / why we need it:

When setting custom ingress rules for the NetworkPolicy via controllerManager.networkPolicy.ingress, helm spits out a warning, because the default value is set to { } instead of an array.

Example Values:

controllerManager:
  networkPolicy:
    enabled: true
    ingress:
      - from:
        - ipBlock:
          cidr: 0.0.0.0/0

Helm Warning:

coalesce.go:286: warning: cannot overwrite table with non table for gatekeeper.controllerManager.networkPolicy.ingress (map[])

This fixes it by setting the default value to an empty array.

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:

@sebastian-stephan sebastian-stephan requested a review from a team as a code owner September 12, 2024 13:24
@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.99%. Comparing base (3350319) to head (73148da).
Report is 143 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (3350319) and HEAD (73148da). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (73148da)
unittests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3541      +/-   ##
==========================================
- Coverage   54.49%   47.99%   -6.50%     
==========================================
  Files         134      218      +84     
  Lines       12329    15167    +2838     
==========================================
+ Hits         6719     7280     +561     
- Misses       5116     7070    +1954     
- Partials      494      817     +323     
Flag Coverage Δ
unittests 47.99% <ø> (-6.50%) ⬇️

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.

Thanks for the PR! lgtm

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

@ritazh ritazh merged commit e32180b into open-policy-agent:master Sep 13, 2024
21 checks passed
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