Files
Tariq HasanandGitHub 1f57df4484 ci(boilerplate): enhance copyright boilerplate enforcement (#3665)
* ci(boilerplate): enforce copyright headers on YAML files

Signed-off-by: tariq-hasan <[email protected]>

* ci(boilerplate): enforce year-less header for new files

Signed-off-by: tariq-hasan <[email protected]>

---------

Signed-off-by: tariq-hasan <[email protected]>
2026-07-03 13:39:54 +00:00

144 lines
4.1 KiB
YAML

{{- /*
Copyright 2025 The Kubeflow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/ -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "trainer.manager.deployment.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "trainer.manager.selectorLabels" . | nindent 4 }}
{{- with .Values.manager.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.manager.replicas }}
selector:
matchLabels:
{{- include "trainer.manager.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "trainer.manager.selectorLabels" . | nindent 8 }}
{{- with .Values.manager.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- $podAnnotations := include "trainer.manager.podAnnotations" . }}
{{- if $podAnnotations }}
annotations:
{{- $podAnnotations | nindent 8 }}
{{- end }}
spec:
containers:
- name: manager
image: {{ include "trainer.image" . }}
{{- with .Values.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
command:
- /manager
args:
- --config=/controller_manager_config.yaml
ports:
- name: health
containerPort: 8081
protocol: TCP
- name: metrics
containerPort: 8443
protocol: TCP
- name: webhook
containerPort: 9443
protocol: TCP
- name: status-server
containerPort: 10443
protocol: TCP
{{- with .Values.manager.env }}
env:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.manager.envFrom }}
envFrom:
{{- toYaml . | nindent 8 }}
{{- end }}
volumeMounts:
- name: webhook-cert
mountPath: /tmp/k8s-webhook-server/serving-certs
readOnly: true
- name: manager-config
mountPath: /controller_manager_config.yaml
subPath: controller_manager_config.yaml
readOnly: true
{{- with .Values.manager.volumeMounts }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.manager.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
livenessProbe:
httpGet:
path: /healthz
port: health
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /readyz
port: health
initialDelaySeconds: 10
periodSeconds: 15
timeoutSeconds: 3
{{- with .Values.manager.securityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
{{- end }}
volumes:
- name: webhook-cert
secret:
secretName: {{ include "trainer.webhook.secret.name" . }}
defaultMode: 420
- name: manager-config
configMap:
name: {{ include "trainer.manager.configmap.name" . }}
{{- with .Values.manager.volumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.manager.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.manager.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.manager.tolerations }}
tolerations:
{{- toYaml . | nindent 6 }}
{{- end }}
serviceAccountName: {{ include "trainer.manager.serviceAccount.name" . }}