|
| 1 | +{{- if .Values.gpuCluster.enabled }} |
| 2 | +apiVersion: nvidia.com/v1alpha1 |
| 3 | +kind: GPUCluster |
| 4 | +metadata: |
| 5 | + name: gpu-cluster |
| 6 | + labels: |
| 7 | + {{- include "gpu-operator.labels" . | nindent 4 }} |
| 8 | + app.kubernetes.io/component: "gpu-operator" |
| 9 | + {{- if .Values.operator.cleanupCRD }} |
| 10 | + # CR cleanup is handled during pre-delete hook |
| 11 | + # Add below annotation so that helm doesn't attempt to cleanup CR twice |
| 12 | + annotations: |
| 13 | + "helm.sh/resource-policy": keep |
| 14 | + {{- end }} |
| 15 | +spec: |
| 16 | + draDriver: |
| 17 | + {{- if .Values.gpuCluster.draDriver.repository }} |
| 18 | + repository: {{ .Values.gpuCluster.draDriver.repository }} |
| 19 | + {{- end }} |
| 20 | + {{- if .Values.gpuCluster.draDriver.image }} |
| 21 | + image: {{ .Values.gpuCluster.draDriver.image }} |
| 22 | + {{- end }} |
| 23 | + {{- if .Values.gpuCluster.draDriver.version }} |
| 24 | + version: {{ .Values.gpuCluster.draDriver.version | quote }} |
| 25 | + {{- end }} |
| 26 | + {{- if .Values.gpuCluster.draDriver.imagePullPolicy }} |
| 27 | + imagePullPolicy: {{ .Values.gpuCluster.draDriver.imagePullPolicy }} |
| 28 | + {{- end }} |
| 29 | + {{- if .Values.gpuCluster.draDriver.imagePullSecrets }} |
| 30 | + imagePullSecrets: {{ toYaml .Values.gpuCluster.draDriver.imagePullSecrets | nindent 6 }} |
| 31 | + {{- end }} |
| 32 | + {{- if .Values.gpuCluster.draDriver.featureGates }} |
| 33 | + featureGates: {{ toYaml .Values.gpuCluster.draDriver.featureGates | nindent 6 }} |
| 34 | + {{- end }} |
| 35 | + {{- if .Values.gpuCluster.draDriver.gpus.kubeletPlugin }} |
| 36 | + gpus: |
| 37 | + kubeletPlugin: {{ toYaml .Values.gpuCluster.draDriver.gpus.kubeletPlugin | nindent 8 }} |
| 38 | + {{- end }} |
| 39 | + computeDomains: |
| 40 | + enabled: {{ .Values.gpuCluster.draDriver.computeDomains.enabled }} |
| 41 | + {{- if .Values.gpuCluster.draDriver.computeDomains.controller }} |
| 42 | + controller: {{ toYaml .Values.gpuCluster.draDriver.computeDomains.controller | nindent 8 }} |
| 43 | + {{- end }} |
| 44 | + {{- if .Values.gpuCluster.draDriver.computeDomains.kubeletPlugin }} |
| 45 | + kubeletPlugin: {{ toYaml .Values.gpuCluster.draDriver.computeDomains.kubeletPlugin | nindent 8 }} |
| 46 | + {{- end }} |
| 47 | + dcgm: |
| 48 | + enabled: {{ .Values.dcgm.enabled }} |
| 49 | + {{- if .Values.dcgm.repository }} |
| 50 | + repository: {{ .Values.dcgm.repository }} |
| 51 | + {{- end }} |
| 52 | + {{- if .Values.dcgm.image }} |
| 53 | + image: {{ .Values.dcgm.image }} |
| 54 | + {{- end }} |
| 55 | + {{- if .Values.dcgm.version }} |
| 56 | + version: {{ .Values.dcgm.version | quote }} |
| 57 | + {{- end }} |
| 58 | + {{- if .Values.dcgm.imagePullPolicy }} |
| 59 | + imagePullPolicy: {{ .Values.dcgm.imagePullPolicy }} |
| 60 | + {{- end }} |
| 61 | + {{- if .Values.dcgm.imagePullSecrets }} |
| 62 | + imagePullSecrets: {{ toYaml .Values.dcgm.imagePullSecrets | nindent 6 }} |
| 63 | + {{- end }} |
| 64 | + {{- if .Values.dcgm.args }} |
| 65 | + args: {{ toYaml .Values.dcgm.args | nindent 6 }} |
| 66 | + {{- end }} |
| 67 | + {{- if .Values.dcgm.env }} |
| 68 | + env: {{ toYaml .Values.dcgm.env | nindent 6 }} |
| 69 | + {{- end }} |
| 70 | + {{- if .Values.dcgm.resources }} |
| 71 | + resources: {{ toYaml .Values.dcgm.resources | nindent 6 }} |
| 72 | + {{- end }} |
| 73 | + {{- if .Values.dcgm.hostNetwork }} |
| 74 | + hostNetwork: {{ .Values.dcgm.hostNetwork }} |
| 75 | + {{- end }} |
| 76 | + dcgmExporter: |
| 77 | + enabled: {{ .Values.dcgmExporter.enabled }} |
| 78 | + {{- if .Values.dcgmExporter.repository }} |
| 79 | + repository: {{ .Values.dcgmExporter.repository }} |
| 80 | + {{- end }} |
| 81 | + {{- if .Values.dcgmExporter.image }} |
| 82 | + image: {{ .Values.dcgmExporter.image }} |
| 83 | + {{- end }} |
| 84 | + {{- if .Values.dcgmExporter.version }} |
| 85 | + version: {{ .Values.dcgmExporter.version | quote }} |
| 86 | + {{- end }} |
| 87 | + {{- if .Values.dcgmExporter.imagePullPolicy }} |
| 88 | + imagePullPolicy: {{ .Values.dcgmExporter.imagePullPolicy }} |
| 89 | + {{- end }} |
| 90 | + {{- if .Values.dcgmExporter.imagePullSecrets }} |
| 91 | + imagePullSecrets: {{ toYaml .Values.dcgmExporter.imagePullSecrets | nindent 6 }} |
| 92 | + {{- end }} |
| 93 | + {{- if .Values.dcgmExporter.annotations }} |
| 94 | + annotations: {{ toYaml .Values.dcgmExporter.annotations | nindent 6 }} |
| 95 | + {{- end }} |
| 96 | + {{- if .Values.dcgmExporter.args }} |
| 97 | + args: {{ toYaml .Values.dcgmExporter.args | nindent 6 }} |
| 98 | + {{- end }} |
| 99 | + {{- if .Values.dcgmExporter.env }} |
| 100 | + env: {{ toYaml .Values.dcgmExporter.env | nindent 6 }} |
| 101 | + {{- end }} |
| 102 | + {{- if .Values.dcgmExporter.resources }} |
| 103 | + resources: {{ toYaml .Values.dcgmExporter.resources | nindent 6 }} |
| 104 | + {{- end }} |
| 105 | + {{- if .Values.dcgmExporter.hostPID }} |
| 106 | + hostPID: {{ .Values.dcgmExporter.hostPID }} |
| 107 | + {{- end }} |
| 108 | + {{- if .Values.dcgmExporter.hostNetwork }} |
| 109 | + hostNetwork: {{ .Values.dcgmExporter.hostNetwork }} |
| 110 | + {{- end }} |
| 111 | + {{- if .Values.dcgmExporter.hpcJobMapping }} |
| 112 | + hpcJobMapping: {{ toYaml .Values.dcgmExporter.hpcJobMapping | nindent 6 }} |
| 113 | + {{- end }} |
| 114 | + {{- if .Values.dcgmExporter.enablePodLabels }} |
| 115 | + enablePodLabels: {{ .Values.dcgmExporter.enablePodLabels }} |
| 116 | + {{- end }} |
| 117 | + {{- if .Values.dcgmExporter.enablePodUID }} |
| 118 | + enablePodUID: {{ .Values.dcgmExporter.enablePodUID }} |
| 119 | + {{- end }} |
| 120 | + {{- if .Values.dcgmExporter.podLabelAllowlistRegex }} |
| 121 | + podLabelAllowlistRegex: {{ toYaml .Values.dcgmExporter.podLabelAllowlistRegex | nindent 6 }} |
| 122 | + {{- end }} |
| 123 | + {{- if .Values.dcgmExporter.service }} |
| 124 | + service: {{ toYaml .Values.dcgmExporter.service | nindent 6 }} |
| 125 | + {{- end }} |
| 126 | + {{- if .Values.dcgmExporter.serviceMonitor }} |
| 127 | + serviceMonitor: {{ toYaml .Values.dcgmExporter.serviceMonitor | nindent 6 }} |
| 128 | + {{- end }} |
| 129 | + {{- if and (.Values.dcgmExporter.config) (.Values.dcgmExporter.config.name) }} |
| 130 | + config: |
| 131 | + name: {{ .Values.dcgmExporter.config.name }} |
| 132 | + {{- end }} |
| 133 | + hostPaths: |
| 134 | + rootFS: {{ .Values.hostPaths.rootFS }} |
| 135 | + driverInstallDir: {{ .Values.hostPaths.driverInstallDir }} |
| 136 | + {{- if .Values.hostPaths.kubeletRootDir }} |
| 137 | + kubeletRootDir: {{ .Values.hostPaths.kubeletRootDir }} |
| 138 | + {{- end }} |
| 139 | + daemonsets: {{ toYaml .Values.daemonsets | nindent 4 }} |
| 140 | +{{- end }} |
0 commit comments