Skip to content

Commit

Permalink
fix: fix running spark pi-python example
Browse files Browse the repository at this point in the history
  • Loading branch information
GezimSejdiu committed Oct 15, 2024
1 parent a6f16d4 commit a9835b9
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 548 deletions.
9 changes: 7 additions & 2 deletions contrib/spark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ SPARK_OPERATOR_HELM_CHART_REPO ?= https://kubeflow.github.io/spark-operator
.PHONY: spark-operator/base
spark-operator/base:
mkdir -p spark-operator/base
cd spark-operator/base && helm template --include-crds spark-operator spark-operator --version ${SPARK_OPERATOR_RELEASE_VERSION} --repo ${SPARK_OPERATOR_HELM_CHART_REPO} > resources.yaml
cd spark-operator/base && \
helm template -n kubeflow --include-crds spark-operator spark-operator \
--set "spark.jobNamespaces={}" \
--set webhook.enable=false \
--version ${SPARK_OPERATOR_RELEASE_VERSION} \
--repo ${SPARK_OPERATOR_HELM_CHART_REPO} > resources.yaml

.PHONY: test
test:
./test.sh ${KF_PROFILE}
./test.sh ${KF_PROFILE}
32 changes: 16 additions & 16 deletions contrib/spark/spark-operator/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ resources:
- resources.yaml
- aggregated-roles.yaml
namespace: kubeflow
patches:
# Add securityContext to Spark Operator Pod.
- target:
kind: Deployment
labelSelector: "app.kubernetes.io/name=spark-operator"
patch: |-
- op: add
path: /spec/template/spec/containers/0/securityContext
value:
runAsUser: 1000
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
# patches:
# # Add securityContext to Spark Operator Pod.
# - target:
# kind: Deployment
# labelSelector: "app.kubernetes.io/name=spark-operator"
# patch: |-
# - op: add
# path: /spec/template/spec/containers/0/securityContext
# value:
# runAsUser: 185
# allowPrivilegeEscalation: false
# capabilities:
# drop: ["ALL"]
# runAsNonRoot: true
# seccompProfile:
# type: RuntimeDefault
Loading

0 comments on commit a9835b9

Please sign in to comment.