44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: vector-logs
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {app.kubernetes.io/name: vector-logs}
|
|
policyTypes: [Ingress, Egress]
|
|
ingress:
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: opentelemetry-collector}
|
|
podSelector:
|
|
matchLabels: {telemetry/collector: traces}
|
|
ports:
|
|
- {port: 4317, protocol: TCP}
|
|
# Kubelet probes originate from the node and are allowed by NetworkPolicy.
|
|
# Do not expose Vector's GraphQL/tap API (8686) to other pods.
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: vmstack}
|
|
ports:
|
|
- {port: 9598, protocol: TCP}
|
|
egress:
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: kube-system}
|
|
podSelector:
|
|
matchLabels: {k8s-app: kube-dns}
|
|
- ipBlock: {cidr: 169.254.25.10/32}
|
|
ports:
|
|
- {port: 53, protocol: UDP}
|
|
- {port: 53, protocol: TCP}
|
|
- to:
|
|
- ipBlock: {cidr: 10.133.0.245/32}
|
|
ports:
|
|
- {port: 9000, protocol: TCP}
|
|
# Vault Agent init container authenticates before Vector starts.
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels: {kubernetes.io/metadata.name: vault}
|
|
ports:
|
|
- {port: 8200, protocol: TCP}
|