apiVersion: apps/v1 kind: Deployment metadata: name: lineage-controller-webhook labels: app: lineage-controller-webhook spec: replicas: {{ .Values.lineageControllerWebhook.replicas }} selector: matchLabels: app: lineage-controller-webhook template: metadata: labels: app: lineage-controller-webhook spec: serviceAccountName: lineage-controller-webhook tolerations: - operator: Exists affinity: nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 preference: matchExpressions: - key: node-role.kubernetes.io/control-plane operator: Exists podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: topologyKey: kubernetes.io/hostname labelSelector: matchLabels: app: lineage-controller-webhook containers: - name: lineage-controller-webhook image: "{{ .Values.lineageControllerWebhook.image }}" {{- if .Values.lineageControllerWebhook.localK8sAPIEndpoint.enabled }} env: - name: KUBERNETES_SERVICE_HOST valueFrom: fieldRef: apiVersion: v1 fieldPath: status.hostIP - name: KUBERNETES_SERVICE_PORT value: "6443" {{- end }} args: {{- if .Values.lineageControllerWebhook.debug }} - --zap-log-level=debug {{- else }} - --zap-log-level=info {{- end }} ports: - name: webhook containerPort: 9443 volumeMounts: - name: webhook-certs mountPath: /tmp/k8s-webhook-server/serving-certs readOnly: true volumes: - name: webhook-certs secret: secretName: lineage-controller-webhook-cert defaultMode: 0400