mirror of
https://github.com/hanzo-ml/spark-operator.git
synced 2026-10-30 20:39:07 +00:00
Align Kustomize webhook cert mounts with Helm (subPath: serving-certs) and extend drift_test.go to compare volumeMounts, volumes, and container images. Signed-off-by: roburishabh <[email protected]>
109 lines
3.4 KiB
YAML
109 lines
3.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: spark-operator-webhook
|
|
namespace: system
|
|
labels:
|
|
app.kubernetes.io/name: spark-operator
|
|
app.kubernetes.io/instance: spark-operator
|
|
app.kubernetes.io/component: webhook
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: spark-operator
|
|
app.kubernetes.io/instance: spark-operator
|
|
app.kubernetes.io/component: webhook
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: spark-operator
|
|
app.kubernetes.io/instance: spark-operator
|
|
app.kubernetes.io/component: webhook
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "8080"
|
|
prometheus.io/path: /metrics
|
|
spec:
|
|
serviceAccountName: spark-operator-webhook
|
|
automountServiceAccountToken: true
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
containers:
|
|
- name: webhook
|
|
image: ghcr.io/kubeflow/spark-operator/controller
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- webhook
|
|
- start
|
|
- --zap-log-level=info
|
|
- --zap-encoder=console
|
|
- --namespaces=
|
|
- --webhook-secret-name=spark-operator-webhook-certs
|
|
- --webhook-secret-namespace=$(WEBHOOK_NAMESPACE)
|
|
- --webhook-svc-name=spark-operator-webhook-svc
|
|
- --webhook-svc-namespace=$(WEBHOOK_NAMESPACE)
|
|
- --webhook-port=9443
|
|
- --mutating-webhook-name=mutating-webhook-configuration
|
|
- --validating-webhook-name=validating-webhook-configuration
|
|
- --enable-metrics=true
|
|
- --metrics-bind-address=:8080
|
|
- --metrics-endpoint=/metrics
|
|
- --metrics-prefix=
|
|
- --metrics-labels=app_type
|
|
- --kube-api-qps=20
|
|
- --kube-api-burst=30
|
|
- --leader-election=true
|
|
- --leader-election-lock-name=spark-operator-webhook-lock
|
|
- --leader-election-lock-namespace=$(WEBHOOK_NAMESPACE)
|
|
env:
|
|
- name: WEBHOOK_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
ports:
|
|
- name: webhook
|
|
containerPort: 9443
|
|
- name: metrics
|
|
containerPort: 8080
|
|
volumeMounts:
|
|
- mountPath: /etc/k8s-webhook-server/serving-certs
|
|
name: serving-certs
|
|
readOnly: false
|
|
subPath: serving-certs
|
|
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: serving-certs
|
|
emptyDir:
|
|
sizeLimit: 500Mi
|
|
terminationGracePeriodSeconds: 10
|