diff --git a/charts/spark-history/Chart.yaml b/charts/spark-history/Chart.yaml index 9226752..e7864d3 100644 --- a/charts/spark-history/Chart.yaml +++ b/charts/spark-history/Chart.yaml @@ -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" diff --git a/charts/spark-history/templates/network-policy.yaml b/charts/spark-history/templates/network-policy.yaml new file mode 100644 index 0000000..77974a2 --- /dev/null +++ b/charts/spark-history/templates/network-policy.yaml @@ -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 }} diff --git a/charts/spark-history/values.yaml b/charts/spark-history/values.yaml index 14f4500..f25a780 100644 --- a/charts/spark-history/values.yaml +++ b/charts/spark-history/values.yaml @@ -20,6 +20,8 @@ serviceAccount: podAnnotations: {} +podLabels: {} + podSecurityContext: fsGroup: 1000 @@ -53,6 +55,9 @@ ingress: # hosts: # - chart-example.local +networkPolicy: + enabled: true + resources: limits: cpu: 1000m