Documentation
¶
Overview ¶
Package networkpolicy builds Cilium isolation and controlled egress policies.
Index ¶
- Constants
- func AgentIngress(infrastructure *ciliumapi.Rule, gatewayNamespace, gatewayAccount string) *ciliumapi.Rule
- func ExternalEgress(targets []Target) []ciliumapi.EgressRule
- func ReconcileRuntimeIsolation(ctx context.Context, c client.Client, namespace *corev1.Namespace) error
- func ServiceEgress(namespace, name string, port int32, morePorts ...int32) []ciliumapi.EgressRule
- type Target
Constants ¶
const AgentRuntimePolicyName = "agent-runtime"
AgentRuntimePolicyName identifies the policy separating Agent pod ingress from the rest of its namespace.
Variables ¶
This section is empty.
Functions ¶
func AgentIngress ¶ added in v0.38.0
func AgentIngress(infrastructure *ciliumapi.Rule, gatewayNamespace, gatewayAccount string) *ciliumapi.Rule
AgentIngress separates Agent runtime ingress from broad infrastructure grants. It excludes Agent endpoints from infrastructure and returns their runtime rule. The browser control port is reachable only by the configured gateway identity.
func ExternalEgress ¶
func ExternalEgress(targets []Target) []ciliumapi.EgressRule
ExternalEgress permits only the supplied FQDN or IP destinations and their ports.
func ReconcileRuntimeIsolation ¶ added in v0.29.0
func ReconcileRuntimeIsolation(ctx context.Context, c client.Client, namespace *corev1.Namespace) error
ReconcileRuntimeIsolation keeps private runtime ingress denied independently of grants and Sandboxes. Namespace ownership keeps it in place during pod teardown.
func ServiceEgress ¶
func ServiceEgress(namespace, name string, port int32, morePorts ...int32) []ciliumapi.EgressRule
ServiceEgress permits DNS resolution and exact Kubernetes Service TCP ports.