Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

68 network policies are actually dont block anything #70

Merged
merged 3 commits into from
Aug 27, 2024
Merged
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
2 changes: 1 addition & 1 deletion charts/vaas/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: vaas
version: 2.0.2
version: 2.1.0
description: Deployment of a Verdict-as-a-Service on-premise instance
maintainers:
- name: G DATA CyberDefense AG
Expand Down
2 changes: 1 addition & 1 deletion charts/vaas/templates/gateway/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "gateway.name" -}}
{{- default .Chart.Name .Values.gateway.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default "gateway" .Values.gateway.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand Down
29 changes: 24 additions & 5 deletions charts/vaas/templates/gateway/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,34 @@ spec:
ingress:
- from:
ports:
- port: 8080 # Http
- port: 8080 # Upload
- port: 9090 # Websocket
egress:
- to:
ports:
- port: 443 # VerdictRequestForUrl
- port: 80 # VerdictRequestForUrl
- port: 6379 # Redis
- port: 8080 # GdScan
- port: 53 # DNS
protocol: UDP
- to:
- podSelector:
matchLabels:
app.kubernetes.io/name: redis
ports:
- port: 6379
- to:
- podSelector:
matchLabels:
app.kubernetes.io/name: gdscan
- podSelector:
matchLabels:
app.kubernetes.io/name: mini-identity-provider
ports:
- port: 8080
- to:
- namespaceSelector: {}
podSelector:
matchLabels:
k8s-app: kube-dns
ports:
- port: 53
protocol: UDP
{{- end }}
2 changes: 1 addition & 1 deletion charts/vaas/templates/gdscan/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "gdscan.name" -}}
{{- default .Chart.Name .Values.gdscan.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default "gdscan" .Values.gdscan.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand Down
5 changes: 4 additions & 1 deletion charts/vaas/templates/gdscan/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ spec:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: gateway
ports:
- port: 8080 # Http
- port: 8080 # Upload
{{- end }}
3 changes: 1 addition & 2 deletions helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ VALUES_FILE=$1
helm dep up charts/vaas
helm lint charts/vaas -f $VALUES_FILE
helm template charts/vaas -f $VALUES_FILE
helm uninstall vaas -n vaas
helm install vaas charts/vaas -f $VALUES_FILE -n vaas --create-namespace
helm upgrade --install vaas charts/vaas -f $VALUES_FILE -n vaas --create-namespace