mirror of
https://github.com/hanzo-ml/spark-operator.git
synced 2026-10-30 20:39:07 +00:00
Add RestSubmitter feature gate to the helm chart that configures the controller to use an external REST submitter service for spark-submit. Changes: - Add RestSubmitter to controller.featureGates (disabled by default) - Add submitter connection config in values.yaml (serviceUrl, timeouts, retries) - Render submitter args in controller deployment when gate is enabled - Add startup probe to controller when submitter is enabled - Add unit tests for enabled/disabled states Out of scope: - Submitter service helm templates (deployed separately from submitter repo) - TLS/mTLS configuration - E2E tests Signed-off-by: Venkateswarlu Komirisetti <[email protected]>
139 lines
4.5 KiB
YAML
139 lines
4.5 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: spark-operator
|
|
labels:
|
|
app.kubernetes.io/name: spark-operator
|
|
app.kubernetes.io/component: operator
|
|
control-plane: controller-manager
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: spark-operator-controller
|
|
namespace: system
|
|
labels:
|
|
app.kubernetes.io/name: spark-operator
|
|
app.kubernetes.io/instance: spark-operator
|
|
app.kubernetes.io/component: controller
|
|
control-plane: controller-manager
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: spark-operator
|
|
app.kubernetes.io/instance: spark-operator
|
|
app.kubernetes.io/component: controller
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: spark-operator
|
|
app.kubernetes.io/instance: spark-operator
|
|
app.kubernetes.io/component: controller
|
|
control-plane: controller-manager
|
|
annotations:
|
|
kubectl.kubernetes.io/default-container: controller
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "8080"
|
|
prometheus.io/path: /metrics
|
|
spec:
|
|
serviceAccountName: spark-operator-controller
|
|
automountServiceAccountToken: true
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
topologySpreadConstraints:
|
|
- maxSkew: 1
|
|
topologyKey: topology.kubernetes.io/zone
|
|
whenUnsatisfiable: ScheduleAnyway
|
|
labelSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: spark-operator
|
|
- maxSkew: 1
|
|
topologyKey: kubernetes.io/hostname
|
|
whenUnsatisfiable: ScheduleAnyway
|
|
labelSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: spark-operator
|
|
containers:
|
|
- name: controller
|
|
image: ghcr.io/kubeflow/spark-operator/controller
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- controller
|
|
- start
|
|
- --zap-log-level=info
|
|
- --zap-encoder=console
|
|
- --namespaces=
|
|
- --controller-threads=10
|
|
- --enable-ui-service=true
|
|
- --enable-metrics=true
|
|
- --metrics-bind-address=:8080
|
|
- --metrics-endpoint=/metrics
|
|
- --metrics-prefix=
|
|
- --metrics-labels=app_type
|
|
- --metrics-job-start-latency-buckets=30,60,90,120,150,180,210,240,270,300
|
|
- --metrics-job-submit-latency-buckets=0.5,1,2,4,8,16,32,64,128,256
|
|
- --leader-election=true
|
|
- --leader-election-lock-name=spark-operator-controller-lock
|
|
- --leader-election-lock-namespace=$(CONTROLLER_NAMESPACE)
|
|
- --leader-election-lease-duration=15s
|
|
- --leader-election-renew-deadline=10s
|
|
- --leader-election-retry-period=2s
|
|
- --workqueue-ratelimiter-bucket-qps=50
|
|
- --workqueue-ratelimiter-bucket-size=500
|
|
- --workqueue-ratelimiter-max-delay=6h
|
|
- --driver-pod-creation-grace-period=10s
|
|
- --max-tracked-executor-per-app=1000
|
|
- --kube-api-qps=20
|
|
- --kube-api-burst=30
|
|
- --feature-gates=PartialRestart=false,LoadSparkDefaults=false,RestSubmitter=false
|
|
- --scheduled-spark-application-timestamp-precision=nanos
|
|
env:
|
|
- name: OPERATOR_VERSION
|
|
value: "2.5.0-rc.0"
|
|
- name: CONTROLLER_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 8080
|
|
volumeMounts:
|
|
- mountPath: /tmp
|
|
name: tmp
|
|
livenessProbe:
|
|
httpGet:
|
|
port: 8081
|
|
path: /healthz
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
readinessProbe:
|
|
httpGet:
|
|
port: 8081
|
|
path: /readyz
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
privileged: false
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir:
|
|
sizeLimit: 1Gi
|
|
terminationGracePeriodSeconds: 10
|