Skip to content

Commit

Permalink
Merge pull request #803 from frittentheke/mig-configs_802
Browse files Browse the repository at this point in the history
Allow passing custom mig-parted configmap data in helm chart
  • Loading branch information
cdesiniotis authored Jul 18, 2024
2 parents d3ac478 + 3e655d7 commit 951df73
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
14 changes: 14 additions & 0 deletions deployments/gpu-operator/templates/mig_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if and (.Values.migManager.config.create) (not (empty .Values.migManager.config.data)) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.migManager.config.name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gpu-operator.labels" . | nindent 4 }}
data:
config.yaml: |
version: v1
mig-configs:
{{- .Values.migManager.config.data | nindent 6 }}
{{- end }}
37 changes: 35 additions & 2 deletions deployments/gpu-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ devicePlugin:
config:
# Create a ConfigMap (default: false)
create: false
# ConfigMap name (either exiting or to create a new one with create=true above)
# ConfigMap name (either existing or to create a new one with create=true above)
name: ""
# Default config name within the ConfigMap
default: ""
Expand Down Expand Up @@ -358,9 +358,42 @@ migManager:
- name: WITH_REBOOT
value: "false"
resources: {}
# MIG configuration
# Use "name" to either point to an existing ConfigMap or to create a new one with a list of configurations(i.e with create=true).
# Use "data" to build an integrated ConfigMap from a set of configurations as
# part of this helm chart. An example of setting "data" might be:
# config:
# name: custom-mig-parted-configs
# create: true
# data: |-
# all-disabled:
# - devices: all
# mig-enabled: false
# custom-mig:
# - devices: [0]
# mig-enabled: false
# - devices: [1]
# mig-enabled: true
# mig-devices:
# "1g.10gb": 7
# - devices: [2]
# mig-enabled: true
# mig-devices:
# "2g.20gb": 2
# "3g.40gb": 1
# - devices: [3]
# mig-enabled: true
# mig-devices:
# "3g.40gb": 1
# "4g.40gb": 1
config:
name: "default-mig-parted-config"
default: "all-disabled"
# Create a ConfigMap (default: false)
create: false
# ConfigMap name (either existing or to create a new one with create=true above)
name: "default-mig-parted-config"
# Data section for the ConfigMap to create (i.e only applies when create=true)
data: {}
gpuClientsConfig:
name: ""

Expand Down

0 comments on commit 951df73

Please sign in to comment.