This repository has been archived on 2026-05-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
irc/znc/ciliumnetworkpolicy.yaml
T
Chris Farhood 19b175dcf2
Best Practices / Kube-score Analysis (push) Has been cancelled
Best Practices / Polaris Audit (push) Has been cancelled
Best Practices / Resource Usage Analysis (push) Has been cancelled
Best Practices / PR Summary Report (push) Has been cancelled
Best Practices / Polaris PR Review (push) Has been cancelled
Security Scan / Trivy Security Scan (push) Has been cancelled
Security Scan / Trivy PR Review (push) Has been cancelled
Security Scan / Checkov IaC Scan (push) Has been cancelled
Security Scan / Checkov PR Review (push) Has been cancelled
Validate Manifests / Kustomize Build Test (push) Successful in 35s
Validate Manifests / YAML Lint (push) Failing after 35s
Validate Manifests / Kubernetes Schema Validation (push) Successful in 35s
feat(irc): restrict ingress to gateway and thelounge
Add CiliumNetworkPolicy ingress rules so thelounge only accepts traffic
from the cilium external gateway in gateway-system, and znc only from
the thelounge pod. Allow host entity on both for kubelet probes.

Switch znc service to ClusterIP and drop the external-dns annotation
since direct external IRC client access is no longer desired.
2026-05-17 08:17:20 -04:00

43 lines
847 B
YAML

apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: znc
namespace: irc
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/name: znc
ingress:
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: irc
k8s:app.kubernetes.io/name: thelounge
toPorts:
- ports:
- port: "6501"
protocol: TCP
- fromEntities:
- host
toPorts:
- ports:
- port: "6501"
protocol: TCP
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s:k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: ANY
rules:
dns:
- matchPattern: "*"
- toFQDNs:
- matchName: "irc.passthepopcorn.me"
toPorts:
- ports:
- port: "6697"
protocol: TCP