Skip to content

Commit 549edba

Browse files
committed
fix(helm): address code review feedback for GPU plugin and cert-manager
1 parent 3c6f4e8 commit 549edba

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

helm/sim/templates/cert-manager-issuers.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
{{- /*
33
cert-manager Issuer Bootstrap Pattern
44

5+
PREREQUISITE: cert-manager must be installed in your cluster before enabling this.
6+
The root CA Certificate is created in the namespace specified by certManager.rootCA.namespace
7+
(defaults to "cert-manager"). Ensure this namespace exists and cert-manager is running there.
8+
9+
Install cert-manager: https://cert-manager.io/docs/installation/
10+
511
This implements the recommended pattern from cert-manager documentation:
612
1. A self-signed ClusterIssuer (for bootstrapping the root CA only)
713
2. A root CA Certificate (self-signed, used to sign other certificates)
@@ -28,11 +34,13 @@ spec:
2834
# 2. Root CA Certificate
2935
# This certificate is signed by the self-signed issuer and becomes the root of trust.
3036
# The secret created here will be used by the CA issuer to sign certificates.
37+
# NOTE: This must be created in the cert-manager namespace (or the namespace specified
38+
# in certManager.rootCA.namespace). Ensure cert-manager is installed there first.
3139
apiVersion: cert-manager.io/v1
3240
kind: Certificate
3341
metadata:
3442
name: {{ .Values.certManager.rootCA.certificateName }}
35-
namespace: {{ .Values.certManager.rootCA.namespace | default "cert-manager" }}
43+
namespace: {{ .Values.certManager.rootCA.namespace | default "cert-manager" }} # Must match cert-manager's cluster-resource-namespace
3644
labels:
3745
{{- include "sim.labels" . | nindent 4 }}
3846
app.kubernetes.io/component: cert-manager

helm/sim/templates/gpu-device-plugin.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ data:
1919
migStrategy: "none"
2020
{{- end }}
2121
failOnInitError: false
22-
nvidiaDriverRoot: /host-proc/driver/nvidia
2322
plugin:
2423
passDeviceSpecs: true
2524
deviceListStrategy: envvar
@@ -28,7 +27,7 @@ data:
2827
timeSlicing:
2928
resources:
3029
- name: nvidia.com/gpu
31-
replicas: {{ .Values.ollama.gpu.timeSlicingReplicas | default 10 }}
30+
replicas: {{ .Values.ollama.gpu.timeSlicingReplicas | default 5 }}
3231
{{- end }}
3332
---
3433
# 2. NVIDIA Device Plugin DaemonSet for GPU support
@@ -76,9 +75,6 @@ spec:
7675
- name: sys
7776
hostPath:
7877
path: /sys
79-
- name: proc-driver-nvidia
80-
hostPath:
81-
path: /proc/driver/nvidia
8278
# Volume to mount the ConfigMap
8379
- name: nvidia-device-plugin-config
8480
configMap:
@@ -89,6 +85,11 @@ spec:
8985
imagePullPolicy: Always
9086
args:
9187
- "--config-file=/etc/device-plugin/config.yaml"
88+
{{- if eq .Values.ollama.gpu.strategy "mig" }}
89+
env:
90+
- name: NVIDIA_MIG_MONITOR_DEVICES
91+
value: all
92+
{{- end }}
9293
securityContext:
9394
allowPrivilegeEscalation: false
9495
capabilities:
@@ -101,9 +102,6 @@ spec:
101102
- name: sys
102103
mountPath: /sys
103104
readOnly: true
104-
- name: proc-driver-nvidia
105-
mountPath: /host-proc/driver/nvidia
106-
readOnly: true
107105
- name: nvidia-device-plugin-config
108106
mountPath: /etc/device-plugin/
109107
readOnly: true

0 commit comments

Comments
 (0)