Repository navigation
config: add NetworkPolicy for operator pod - #30
Merged
Merged
Conversation
Rakshith-R
force-pushed
the
operator-network-policy
branch
from
October 22, 2026 13:50
d29ff02 to
fd2b75c
Compare
| select { | ||
| case <-r.exitCh: | ||
| case err := <-r.exitCh: | ||
| _ = err |
Contributor
There was a problem hiding this comment.
What is the change here? Can you drop this not related to this PR?
| @@ -1,2 +1,2 @@ | |||
| resources: | |||
| - allow-metrics-traffic.yaml | |||
Contributor
There was a problem hiding this comment.
This is no longer used now since ingress is now denied by default.
Either remove the file or add a comment [Metrics] telling users to add it back when they enable metrics?
| matchLabels: | ||
| control-plane: controller-manager | ||
| app.kubernetes.io/name: ceph-volsync-plugin-operator | ||
| # Ingress is not specified - deny all inbound traffic. |
Contributor
There was a problem hiding this comment.
Suggested change
| # Ingress is not specified - deny all inbound traffic. | |
| # Ingress is listed in `policyTypes` with no rules, so all inbound traffic is denied. |
| kind: NetworkPolicy | ||
| metadata: | ||
| name: controller-manager | ||
| namespace: system |
Contributor
There was a problem hiding this comment.
add following?
app.kubernetes.io/name: ceph-volsync-plugin-operator
app.kubernetes.io/managed-by: kustomize
Add a NetworkPolicy for the controller-manager pod that denies all ingress and allows all egress, matching ceph-csi-operator and kubernetes-csi-addons. The operator exposes no ports by default (metrics are disabled and kubelet health probes bypass NetworkPolicy). Egress stays open for API server access. The policy is included in config/default and in the OLM bundle. Also mark the unused receive in RsyncDaemon.Stop as explicitly discarded to fix the errcheck finding in golangci-lint v2.15.0. Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: Rakshith R <rar@redhat.com>
Rakshith-R
force-pushed
the
operator-network-policy
branch
from
October 23, 2026 13:31
fd2b75c to
cdcdd4f
Compare
iPraveenParihar
approved these changes
Oct 27, 2026
Rakshith-R
marked this pull request as ready for review
October 30, 2026 06:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a NetworkPolicy for the controller-manager pod that denies all ingress and allows all egress, matching ceph-csi-operator and kubernetes-csi-addons. The operator exposes no ports by default (metrics are disabled and kubelet health probes bypass NetworkPolicy). Egress stays open for API server access.
The policy is included in config/default and in the OLM bundle.
Assisted-by: Claude noreply@anthropic.com