aboutsummaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/helm/sriov-network-operator/templates/operator.yaml
blob: 679ed269253c7cb53908c60036008996132c3be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovOperatorConfig
metadata:
  name: default
  labels:
    {{- include "sriov-network-operator.labels" . | nindent 4 }}
spec:
  {{- with .Values.configDaemon.nodeSelector }}
  configDaemonNodeSelector:
    {{- toYaml . | nindent 4 }}
  {{- end }}
  enableInjector: {{ .Values.enableInjector }}
  enableOperatorWebhook: {{ .Values.enableOperatorWebhook }}
  logLevel: {{ .Values.logLevel }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name:  {{ include "sriov-network-operator.fullname" . }}
  labels:
    {{- include "sriov-network-operator.labels" . | nindent 4 }}
spec:
  replicas: 1
  selector:
    matchLabels:
      {{- include "sriov-network-operator.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        {{- include "sriov-network-operator.selectorLabels" . | nindent 8 }}
    spec:
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      serviceAccountName: {{ include "sriov-network-operator.serviceAccountName" . }}
      containers:
        - name: sriov-network-operator
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          command:
          - sriov-network-operator
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: SRIOV_CNI_IMAGE
              value: "{{ .Values.cni.image.repository }}:{{ .Values.cni.image.tag | default .Chart.AppVersion }}"
            - name: SRIOV_INFINIBAND_CNI_IMAGE
              value: "{{ .Values.infinibandCni.image.repository }}:{{ .Values.infinibandCni.image.tag | default .Chart.AppVersion }}"
            - name: SRIOV_DEVICE_PLUGIN_IMAGE
              value: "{{ .Values.devicePlugin.image.repository }}:{{ .Values.devicePlugin.image.tag | default .Chart.AppVersion }}"
            - name: NETWORK_RESOURCES_INJECTOR_IMAGE
              value: "{{ .Values.resourcesInjector.image.repository }}:{{ .Values.resourcesInjector.image.tag | default .Chart.AppVersion }}"
            - name: OPERATOR_NAME
              value: "sriov-network-operator"
            - name: SRIOV_NETWORK_CONFIG_DAEMON_IMAGE
              value: "{{ .Values.configDaemon.image.repository }}:{{ .Values.configDaemon.image.tag | default .Chart.AppVersion }}"
            - name: SRIOV_NETWORK_WEBHOOK_IMAGE
              value: "{{ .Values.webhook.image.repository }}:{{ .Values.webhook.image.tag | default .Chart.AppVersion }}"
            - name: RESOURCE_PREFIX
              value: "{{ .Values.resourcePrefix }}"
            - name: ENABLE_ADMISSION_CONTROLLER
              value: "false"
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: RELEASE_VERSION
              value: "4.3.0"
            - name: SRIOV_CNI_BIN_PATH
              value: "/opt/cni/bin"
      {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
      {{- end }}