Skip to content

feat(tektonpipeline): add NetworkPolicy for pipeline core components - #3758

Merged
tekton-robot merged 2 commits into
tektoncd:mainfrom
khrm:feat/networkpolicy-pipeline
Jul 21, 2026
Merged

feat(tektonpipeline): add NetworkPolicy for pipeline core components #3758
tekton-robot merged 2 commits into
tektoncd:mainfrom
khrm:feat/networkpolicy-pipeline

Conversation

@khrm

@khrm khrm commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

TektonPipeline now ships default NetworkPolicy resources for pipeline-controller, pipeline-webhook, pipeline-events-controller, and pipeline-resolvers pods, restricting network access to
  only DNS, API server, Prometheus metrics, and webhook traffic. Resolvers additionally allow HTTP/HTTPS and SSH egress for git, bundle, hub, and http resolver types.

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 19, 2026
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 19, 2026

@khrm khrm left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 19, 2026
@codecov-commenter

codecov-commenter commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.40%. Comparing base (0becb4f) to head (24f8f7d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3758      +/-   ##
==========================================
- Coverage   25.47%   25.40%   -0.07%     
==========================================
  Files         449      449              
  Lines       23382    23477      +95     
==========================================
+ Hits         5956     5964       +8     
- Misses      16735    16822      +87     
  Partials      691      691              
Flag Coverage Δ
unit-tests 25.40% <ø> (-0.07%) ⬇️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khrm
khrm force-pushed the feat/networkpolicy-pipeline branch from 5146fed to cc3ba5e Compare July 20, 2026 11:08
@khrm khrm changed the title [WIP] feat(tektonpipeline): add NetworkPolicy for pipeline core components feat(tektonpipeline): add NetworkPolicy for pipeline core components Jul 20, 2026
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 20, 2026
@khrm
khrm force-pushed the feat/networkpolicy-pipeline branch from cc3ba5e to 7b8ae8d Compare July 20, 2026 13:21

@khrm khrm left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@khrm
khrm force-pushed the feat/networkpolicy-pipeline branch from 7b8ae8d to 5e347a4 Compare July 20, 2026 14:32
@jkhelil

jkhelil commented Jul 20, 2026

Copy link
Copy Markdown
Member

Please add Release note

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesnt merit a release note. labels Jul 21, 2026
@khrm
khrm force-pushed the feat/networkpolicy-pipeline branch from 5e347a4 to f34b675 Compare July 21, 2026 07:06
@jkhelil

jkhelil commented Jul 21, 2026

Copy link
Copy Markdown
Member

/approve

@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkhelil

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 21, 2026
@pramodbindal

Copy link
Copy Markdown
Member

/lgtm

@tekton-robot tekton-robot added lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 21, 2026
khrm added 2 commits July 21, 2026 18:39
Add default NetworkPolicies for pipeline-controller, pipeline-webhook,
pipeline-events-controller, and pipeline-resolvers. Resolvers get
additional SSH (port 22) and Internet (80/443) egress for git, bundle,
hub, and http resolver types. Add SSHEgressRule helper to shared
networkpolicy package and NP validation to TektonPipeline.

Signed-off-by: Khurram Baig <kbaig@redhat.com>
Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extend TestTektonPipelineNetworkPolicy to verify the 5 new pipeline
core policies (controller, webhook, events-controller, resolvers,
default-deny). Add resolver functional tests for cluster and hub
resolver types to exercise API server and internet egress under NP.

Signed-off-by: Khurram Baig <kbaig@redhat.com>
Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@khrm
khrm force-pushed the feat/networkpolicy-pipeline branch from f34b675 to 24f8f7d Compare July 21, 2026 13:09
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2026
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 21, 2026
@pratap0007

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2026
@tekton-robot
tekton-robot merged commit 89d6463 into tektoncd:main Jul 21, 2026
16 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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

6 participants