Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions helm/codeapi/templates/network-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,22 @@ spec:
- protocol: TCP
port: 9000
{{- end }}
{{- if .Values.fileServer.s3.enabled }}
{{- with .Values.networkPolicy.fileServer.s3CIDRs }}
{{- range . }}
- to:
- ipBlock:
cidr: {{ . | quote }}
ports:
- protocol: TCP
port: 443
{{- end }}
{{- else }}
- ports:
- protocol: TCP
port: 443
{{- end }}
{{- end }}
{{- include "codeapi.redisEgress" . | nindent 4 }}
---
apiVersion: networking.k8s.io/v1
Expand Down
9 changes: 9 additions & 0 deletions helm/codeapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -539,5 +539,14 @@ networkPolicy:
# egress on the configured Redis port to any destination because standard
# Kubernetes NetworkPolicy cannot target redis.external.host by DNS name.
externalCIDRs: []
fileServer:
# Used only when fileServer.s3.enabled=true, to allow egress to S3 (and STS,
# with IRSA). If empty, NetworkPolicy permits TCP egress on 443 to any
# destination, because standard Kubernetes NetworkPolicy cannot target the
# S3 and STS endpoints by DNS name. To restrict it, list e.g. the subnets of
# your S3 and STS VPC interface endpoints, or the S3 ranges published at
# https://ip-ranges.amazonaws.com/ip-ranges.json. Note: Those change over time,
# and don't include STS, which IRSA also needs.
s3CIDRs: []
toolCallServer:
allowExternalEgress: false # Allow tool call server to reach external APIs