Skip to content

Commit

Permalink
feat(spark-history): add network-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
ebuildy committed Nov 18, 2022
1 parent 04d968e commit 0b09f2d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/spark-history/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: Deploy the spark-history web UI

type: application

version: 0.2.0
version: 0.2.1

appVersion: "3.3.1"
18 changes: 18 additions & 0 deletions charts/spark-history/templates/network-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "spark-history.fullname" . }}
labels:
{{- include "spark-history.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "spark-history.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
ingress:
- ports:
- port: {{ .Values.service.port }}
protocol: TCP
{{- end }}
5 changes: 5 additions & 0 deletions charts/spark-history/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ serviceAccount:

podAnnotations: {}

podLabels: {}

podSecurityContext:
fsGroup: 1000

Expand Down Expand Up @@ -53,6 +55,9 @@ ingress:
# hosts:
# - chart-example.local

networkPolicy:
enabled: true

resources:
limits:
cpu: 1000m
Expand Down

0 comments on commit 0b09f2d

Please sign in to comment.