Skip to content

[VC-48226]: document default NetworkPolicy and example values#1911

Merged
cert-manager-prow[bot] merged 1 commit intocert-manager:release-nextfrom
wallrj-cyberark:8370-enable-network-policy
Jan 16, 2026
Merged

[VC-48226]: document default NetworkPolicy and example values#1911
cert-manager-prow[bot] merged 1 commit intocert-manager:release-nextfrom
wallrj-cyberark:8370-enable-network-policy

Conversation

@wallrj-cyberark
Copy link
Copy Markdown
Member

@wallrj-cyberark wallrj-cyberark commented Jan 9, 2026

Preview:

Documentation to accompany @jcpunk 's cert-manager/cert-manager#8370

Changes

  • Document default NetworkPolicy behavior and recommend restricting rules
  • Add example Helm values for enabling networkPolicy per component
  • Update public best-practice YAML to enable networkPolicy keys

Slack Discussion

Testing

I tested the sample Helm values by using them in the best-practice E2E tests in:

@cert-manager-prow cert-manager-prow bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 9, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 9, 2026

Deploy Preview for cert-manager ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 315b301
🔍 Latest deploy log https://app.netlify.com/projects/cert-manager/deploys/696a7f9c82d0550009d107c4
😎 Deploy Preview https://deploy-preview-1911--cert-manager.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Member Author

@wallrj-cyberark wallrj-cyberark Jan 9, 2026

Choose a reason for hiding this comment

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

@wallrj-cyberark wallrj-cyberark force-pushed the 8370-enable-network-policy branch 4 times, most recently from 9869747 to 4a2cd01 Compare January 15, 2026 17:25
Comment on lines +63 to +72
# Example: Internal DNS (Bind) server
- ports:
- port: 8053
protocol: UDP
- port: 8053
protocol: TCP
to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: bind
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Our E2E test bind server actually has a ClusterIP Service which maps port 53 to targetPort 8053,
but the kindnet NetworkPolicy implementation seems to ignore the service port. Maybe Calico works the same, based on this comment:

@wallrj-cyberark wallrj-cyberark force-pushed the 8370-enable-network-policy branch from 4a2cd01 to bd7b6cf Compare January 16, 2026 09:07
@wallrj-cyberark wallrj-cyberark force-pushed the 8370-enable-network-policy branch from bd7b6cf to 6086219 Compare January 16, 2026 15:02
@cert-manager-prow cert-manager-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 16, 2026
@wallrj-cyberark
Copy link
Copy Markdown
Member Author

Rebasing on release-next because this refers to features which will only be available in the upcoming cert-manager 1.20 release,

@wallrj-cyberark wallrj-cyberark force-pushed the 8370-enable-network-policy branch from 6086219 to 9717403 Compare January 16, 2026 15:42
@wallrj-cyberark wallrj-cyberark changed the base branch from master to release-next January 16, 2026 15:43
@wallrj-cyberark wallrj-cyberark force-pushed the 8370-enable-network-policy branch from 9717403 to 8e4eabf Compare January 16, 2026 16:00
@erikgb erikgb requested a review from Copilot January 16, 2026 17:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds documentation for the new NetworkPolicy feature in cert-manager 1.20, which allows users to create NetworkPolicy resources for cert-manager deployments via the Helm chart.

Changes:

  • Added NetworkPolicy section to release notes explaining the new feature
  • Documented default NetworkPolicy behavior and provided guidance on customizing rules
  • Added example Helm values demonstrating how to enable NetworkPolicy for each component

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
content/docs/releases/release-notes/release-notes-1.20.md Added "Network Policy" major theme with brief description and link to best practices
content/docs/installation/best-practice.md Added comprehensive NetworkPolicy documentation including defaults, example Helm values, and security recommendations
public/docs/installation/best-practice/values.best-practice.yaml Added NetworkPolicy configuration for controller, webhook, and cainjector components with example egress rules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wallrj-cyberark wallrj-cyberark force-pushed the 8370-enable-network-policy branch from acb3aeb to 2047a18 Compare January 16, 2026 17:55
protocol: UDP
# ACME HTTP01 self-checks
- port: 80
protocol: TCP
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we normally repeat the chart defaults? Can we link to the defaults instead, or remove this duplication?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As the Helm template is currently written, the defaults get overwritten by any egress rules you specify in the values.
And I think that makes sense because the defaults are too permissive for most.

The problem is that I'm trying to use this documentation to test the defaults...perhaps that's a mistake.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, I think using the documentation to test the defaults is a brilliant idea! 👏 But I don't understand why we have to repeat the defaults here, if the purpose is to test the defaults. Isn't the egress element here identical to the default?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've tried to make it clearer.

…s rules

- Document default NetworkPolicy behavior and recommend restricting rules
- Add example Helm values for enabling networkPolicy per component
- Update public best-practice YAML to enable networkPolicy keys

Signed-off-by: Richard Wall <richard.wall@cyberark.com>
@wallrj-cyberark wallrj-cyberark force-pushed the 8370-enable-network-policy branch from 2047a18 to 315b301 Compare January 16, 2026 18:12
Copy link
Copy Markdown
Member

@erikgb erikgb left a comment

Choose a reason for hiding this comment

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

Thanks @wallrj!

/lgtm
/approve

@cert-manager-prow cert-manager-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2026
@cert-manager-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erikgb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 16, 2026
@cert-manager-prow cert-manager-prow bot merged commit 8336efc into cert-manager:release-next Jan 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants