mirror of https://git.rancher.io/charts
71 lines
3.5 KiB
Diff
71 lines
3.5 KiB
Diff
--- charts-original/templates/operator.yaml
|
|
+++ charts/templates/operator.yaml
|
|
@@ -1,7 +1,22 @@
|
|
+{{- if not (.Capabilities.APIVersions.Has "k8s.cni.cncf.io/v1/NetworkAttachmentDefinition") -}}
|
|
+{{- required "rke2-multus is required but not found" "" -}}
|
|
+{{- end -}}
|
|
+apiVersion: sriovnetwork.openshift.io/v1
|
|
+kind: SriovOperatorConfig
|
|
+metadata:
|
|
+ name: default
|
|
+ namespace: {{ .Release.Namespace }}
|
|
+spec:
|
|
+ # Add fields here
|
|
+ enableInjector: {{ .Values.operator.enableAdmissionController }}
|
|
+ enableOperatorWebhook: {{ .Values.operator.enableAdmissionController }}
|
|
+ configDaemonNodeSelector: {feature.node.kubernetes.io/network-sriov.capable: "true"}
|
|
+---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "sriov-network-operator.fullname" . }}
|
|
+ namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "sriov-network-operator.labels" . | nindent 4 }}
|
|
spec:
|
|
@@ -25,7 +40,7 @@
|
|
serviceAccountName: {{ include "sriov-network-operator.fullname" . }}
|
|
containers:
|
|
- name: {{ include "sriov-network-operator.fullname" . }}
|
|
- image: {{ .Values.images.operator }}
|
|
+ image: {{ include "system_default_registry" . }}{{ .Values.images.operator.image }}:{{ .Values.images.operator.tag }}
|
|
command:
|
|
- sriov-network-operator
|
|
imagePullPolicy: IfNotPresent
|
|
@@ -35,19 +50,19 @@
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: SRIOV_CNI_IMAGE
|
|
- value: {{ .Values.images.sriovCni }}
|
|
+ value: {{ include "system_default_registry" . }}{{ .Values.images.sriovCni.image }}:{{ .Values.images.sriovCni.tag }}
|
|
- name: SRIOV_INFINIBAND_CNI_IMAGE
|
|
- value: {{ .Values.images.ibSriovCni }}
|
|
+ value: {{ include "system_default_registry" . }}{{ .Values.images.ibSriovCni.image }}:{{ .Values.images.ibSriovCni.tag }}
|
|
- name: SRIOV_DEVICE_PLUGIN_IMAGE
|
|
- value: {{ .Values.images.sriovDevicePlugin }}
|
|
+ value: {{ include "system_default_registry" . }}{{ .Values.images.sriovDevicePlugin.image }}:{{ .Values.images.sriovDevicePlugin.tag }}
|
|
- name: NETWORK_RESOURCES_INJECTOR_IMAGE
|
|
- value: {{ .Values.images.resourcesInjector }}
|
|
+ value: {{ include "system_default_registry" . }}{{ .Values.images.resourcesInjector.image }}:{{ .Values.images.resourcesInjector.tag }}
|
|
- name: OPERATOR_NAME
|
|
value: sriov-network-operator
|
|
- name: SRIOV_NETWORK_CONFIG_DAEMON_IMAGE
|
|
- value: {{ .Values.images.sriovConfigDaemon }}
|
|
+ value: {{ include "system_default_registry" . }}{{ .Values.images.sriovConfigDaemon.image }}:{{ .Values.images.sriovConfigDaemon.tag }}
|
|
- name: SRIOV_NETWORK_WEBHOOK_IMAGE
|
|
- value: {{ .Values.images.webhook }}
|
|
+ value: {{ include "system_default_registry" . }}{{ .Values.images.webhook.image }}:{{ .Values.images.webhook.tag }}
|
|
- name: RESOURCE_PREFIX
|
|
value: {{ .Values.operator.resourcePrefix }}
|
|
- name: ENABLE_ADMISSION_CONTROLLER
|
|
@@ -64,3 +79,9 @@
|
|
value: {{ .Release.AppVersion }}
|
|
- name: SRIOV_CNI_BIN_PATH
|
|
value: {{ .Values.operator.cniBinPath }}
|
|
+ {{- if .Values.operator.enableAdmissionController }}
|
|
+ {{- if not .Values.cert_manager }}
|
|
+ - name: WEBHOOK_CA_BUNDLE
|
|
+ value: "{{ include "sriov_operator_ca_cert" . }}"
|
|
+ {{- end }}
|
|
+ {{- end }}
|