-
Notifications
You must be signed in to change notification settings - Fork 535
fix: NetworkPolicies of Control-Planes #1701
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ spec: | |
| - ports: | ||
| - port: 443 | ||
| - port: 8443 | ||
| to: | ||
| - to: | ||
| - podSelector: | ||
| matchLabels: | ||
| release: {{ .Release.Name }} | ||
|
|
@@ -78,21 +78,25 @@ spec: | |
| matchLabels: | ||
| release: {{ .Release.Name }} | ||
| egress: | ||
| # Allows outgoing connections to all pods with | ||
| # port 443, 8443 or 6443. This is needed for host Kubernetes | ||
| # access | ||
| # Allows outgoing connections to all necessary pods with | ||
| # port 443, 8443 or 6443 or system dns. This is needed for | ||
| # host Kubernetes access. | ||
| - ports: | ||
| - port: 443 | ||
| - port: 8443 | ||
| - port: 6443 | ||
| # Allows outgoing connections to all vcluster workloads | ||
| # or kube system dns server | ||
| - port: 53 | ||
| protocol: UDP | ||
| - port: 53 | ||
| protocol: TCP | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we already have the rule below that selects DNS in the kube-system namespace, why is this still required? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous NetworkPolicy And, the control-plane of a vcluster still need to communicate host's kube-dns. That is why we want add this rule. And it did crash without this rule. Meanwhile, the original version of first |
||
| - to: | ||
| - podSelector: {} | ||
| - podSelector: | ||
| matchLabels: | ||
| release: {{ .Release.Name }} | ||
| - namespaceSelector: | ||
| matchLabels: | ||
| kubernetes.io/metadata.name: 'kube-system' | ||
| podSelector: | ||
| - podSelector: | ||
|
||
| matchLabels: | ||
| k8s-app: kube-dns | ||
| policyTypes: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes logic from an
andto anor, why is this required? This basically allows communication with all pods on port 443 and 8443 as well as all ports on the control-planeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous one. I misunderstand the grammar of
NetworkPolicyEgressRule. Just revert back