GPU-Live/network-operator/charts/nic-configuration-operator-.../templates/operator.yaml

62 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "nic-configuration-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: nic-configuration-operator
app.kubernetes.io/part-of: nic-configuration-operator
{{- include "nic-configuration-operator.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
control-plane: {{ .Release.Name }}-controller-manager
{{- include "nic-configuration-operator.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
control-plane: {{ .Release.Name }}-controller-manager
{{- include "nic-configuration-operator.selectorLabels" . | nindent 8 }}
annotations:
kubectl.kubernetes.io/default-container: manager
spec:
tolerations: {{- toYaml .Values.operator.tolerations | nindent 8 }}
nodeSelector: {{- toYaml .Values.operator.nodeSelector | nindent 8 }}
affinity: {{- toYaml .Values.operator.affinity | nindent 8 }}
imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }}
securityContext:
runAsNonRoot: true
serviceAccountName: {{ include "nic-configuration-operator.serviceAccountName" . }}
terminationGracePeriodSeconds: 10
containers:
- name: manager
command:
- /manager
image: "{{ .Values.operator.image.repository }}/{{ .Values.operator.image.name }}:{{ .Values.operator.image.tag | default .Chart.AppVersion }}"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
{{- if .Values.logLevel}}
env:
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
{{- end}}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 12 }}