24 行
444 B
YAML
24 行
444 B
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: allow-gitea
|
|
namespace: infra-gitops
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: gitea
|
|
ingress:
|
|
- from:
|
|
- podSelector: {}
|
|
- ipBlock:
|
|
cidr: 100.0.0.0/8
|
|
ports:
|
|
- port: 3000
|
|
protocol: TCP
|
|
- port: 2222
|
|
protocol: TCP
|
|
egress:
|
|
- {}
|
|
policyTypes:
|
|
- Ingress
|
|
- Egress |