gcloud-lab/trading-platform/deploy/helm/data-service/templates/networkpolicy.yaml
Sirius Devops d079d1239f feat: add trading platform K8s deployment infrastructure
- Add Helm chart with 19 templates (Deployments, Services, Ingress,
  ConfigMaps, Secrets, NetworkPolicy, cert-manager)
- Add Dockerfiles for 4 microservices (dashboard, data-service,
  execute-service, news-service)
- Add CI/CD workflows (build-test, build-push, deploy)
- Add raw K8s manifests, per-service Helm charts, and deploy scripts
- Add SOPS-encrypted secrets template and config
- Configure deployment to customer1 namespace
- Include infrastructure components: PostgreSQL, Redis, Kafka
2026-05-17 22:15:00 +00:00

29 lines
664 B
YAML

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "data-service.fullname" . }}-network-policy
labels:
{{- include "data-service.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "data-service.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
- Egress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: api-gateway
ports:
- port: http
protocol: TCP
egress:
# Allow DNS resolution
- to: []
ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP