policy/api: add ability to select reserved:health entity from CCNP and / or CNP#11099
policy/api: add ability to select reserved:health entity from CCNP and / or CNP#11099
Conversation
With the introduction of CiliumClusterwideNetworkPolicies a policy has
the ability to select the 'reserved:health' endpoints. If a user applies
a policy such as [0], it will block all connectivity for the health
endpoints. As this does not seem expected, since Cilium will report that
the connectivity across Cilium pods is not working, the user will need to
deploy a CCNP that allows connectivity between health endpoints. This
can be done with [1].
This commit introduces 'reserved:health' as an entity that can be
selected by CNP and / or CCNP.
[0]
```
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: ingress-deny-all
spec:
endpointSelector:
matchLabels: {}
ingress:
- {}
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: egress-deny-all
spec:
endpointSelector:
matchLabels: {}
egress:
- {}
```
[1]
```
apiVersion: "cilium.io/v2"
kind: CiliumClusterwideNetworkPolicy
metadata:
name: "allow-reserved-health"
spec:
endpointSelector:
matchLabels:
'reserved:health': ""
ingress:
- fromEntities:
- health
```
Signed-off-by: André Martins <andre@cilium.io>
|
test-me-please |
There was a problem hiding this comment.
Simple change, low risk, LGTM.
I do wonder if we could handle this better on the internal side. Seems a bit weird that the user is forced to think about the policy implications for infrastructure-level checks run by the daemon. Suggestion is something like excluding cilium-health endpoint from CCNP. Though we also would need to be quite careful there to ensure that any such changes don't accidentally apply to other endpoints and open an unintended hole.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This issue has not seen any activity since it was marked stale. Closing. |
With the introduction of CiliumClusterwideNetworkPolicies a policy has
the ability to select the 'reserved:health' endpoints. If a user applies
a policy such as [0], it will block all connectivity for the health
endpoints. As this does not seem expected, since Cilium will report that
the connectivity across Cilium pods is not working, the user will need to
deploy a CCNP that allows connectivity between health endpoints. This
can be done with [1].
This commit introduces 'reserved:health' as an entity that can be
selected by CNP and / or CCNP.
[0]
[1]
Signed-off-by: André Martins andre@cilium.io