Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions charts/hami/Chart.lock

This file was deleted.

6 changes: 0 additions & 6 deletions charts/hami/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ version: 2.9.0
# It is recommended to use it with quotes.
Comment thread
archlitchi marked this conversation as resolved.
appVersion: "2.9.0"

dependencies:
- name: hami-dra
version: "0.2.0"
repository: "https://project-hami.github.io/HAMi-DRA/"
condition: dra.enabled

kubeVersion: ">= 1.18.0-0"

keywords:
Expand Down
Binary file removed charts/hami/charts/hami-dra-0.2.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion charts/hami/templates/device-plugin/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.devicePlugin.enabled (not .Values.devicePlugin.nodeConfiguration.externalConfigName) (not .Values.dra.enabled) -}}
{{- if and .Values.devicePlugin.enabled (not .Values.devicePlugin.nodeConfiguration.externalConfigName) -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/device-plugin/daemonsetnvidia.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.devicePlugin.enabled (not .Values.dra.enabled) }}
{{- if .Values.devicePlugin.enabled }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/device-plugin/monitorrole.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.devicePlugin.enabled (not .Values.dra.enabled) -}}
{{- if .Values.devicePlugin.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.devicePlugin.enabled (not .Values.dra.enabled) -}}
{{- if .Values.devicePlugin.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/device-plugin/monitorservice.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.devicePlugin.enabled (not .Values.dra.enabled) -}}
{{- if .Values.devicePlugin.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.devicePlugin.enabled (not .Values.dra.enabled) -}}
{{- if .Values.devicePlugin.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/device-plugin/runtime-class.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.devicePlugin.enabled (not .Values.dra.enabled) -}}
{{- if .Values.devicePlugin.enabled -}}
{{- if and .Values.devicePlugin.createRuntimeClass .Values.devicePlugin.runtimeClassName }}
apiVersion: node.k8s.io/v1
kind: RuntimeClass
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/device-plugin/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.devicePlugin.enabled (not .Values.dra.enabled) (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") .Values.prometheus.enabled }}
{{- if and .Values.devicePlugin.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") .Values.prometheus.enabled }}
# Prometheus Service Monitor
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/scheduler/certmanager.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
{{- if .Values.scheduler.certManager.enabled }}
apiVersion: cert-manager.io/v1
kind: Certificate
Expand Down
5 changes: 0 additions & 5 deletions charts/hami/templates/scheduler/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.dra.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand All @@ -22,9 +21,6 @@ rules:
- apiGroups: [""]
resources: ["resourcequotas"]
verbs: ["get", "list", "watch"]
- apiGroups: ["resource.k8s.io"]
resources: ["deviceclasses", "resourceclaims", "resourceclaimtemplates", "resourceslices"]
verbs: ["get", "list", "watch"]
---
{{- if .Values.mockDevicePlugin.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -36,4 +32,3 @@ rules:
resources: ["nodes"]
verbs: ["get", "update", "list", "patch"]
{{- end -}}
{{- end }}
4 changes: 1 addition & 3 deletions charts/hami/templates/scheduler/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.dra.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down Expand Up @@ -45,5 +44,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ include "hami-vgpu.scheduler" . }}
namespace: {{ include "hami-vgpu.namespace" . }}
{{- end }}
namespace: {{ include "hami-vgpu.namespace" . }}
2 changes: 1 addition & 1 deletion charts/hami/templates/scheduler/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.kubeScheduler.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.kubeScheduler.enabled -}}
{{- $k8sMinor := regexReplaceAll "[^0-9]" .Capabilities.KubeVersion.Minor "" | int -}}
apiVersion: v1
kind: ConfigMap
Expand Down
2 changes: 0 additions & 2 deletions charts/hami/templates/scheduler/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.dra.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -229,4 +228,3 @@ spec:
{{- if .Values.scheduler.nodeName }}
nodeName: {{ .Values.scheduler.nodeName }}
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/hami/templates/scheduler/device-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.dra.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -454,4 +453,3 @@ data:
aiCore: 10
aiCPU: 3
{{ end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/hami/templates/scheduler/job-patch/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
{{- if and (.Values.scheduler.patch.enabled) (not .Values.scheduler.certManager.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
{{- if and (.Values.scheduler.patch.enabled) (not .Values.scheduler.certManager.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
{{- if and (.Values.scheduler.patch.enabled) (not .Values.scheduler.certManager.enabled) }}
apiVersion: batch/v1
kind: Job
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
{{- if and (.Values.scheduler.patch.enabled) (not .Values.scheduler.certManager.enabled) }}
apiVersion: batch/v1
kind: Job
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/scheduler/job-patch/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
{{- if and (.Values.scheduler.patch.enabled) (not .Values.scheduler.certManager.enabled) }}
{{- if .Values.podSecurityPolicy.enabled }}
apiVersion: policy/v1beta1
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/scheduler/job-patch/role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
{{- if and (.Values.scheduler.patch.enabled) (not .Values.scheduler.certManager.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
2 changes: 1 addition & 1 deletion charts/hami/templates/scheduler/job-patch/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
{{- if and (.Values.scheduler.patch.enabled) (not .Values.scheduler.certManager.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) }}
{{- if .Values.scheduler.admissionWebhook.enabled }}
{{- if and (.Values.scheduler.patch.enabled) (not .Values.scheduler.certManager.enabled) }}
apiVersion: v1
kind: ServiceAccount
Expand Down
4 changes: 1 addition & 3 deletions charts/hami/templates/scheduler/role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.dra.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
Expand All @@ -10,5 +9,4 @@ metadata:
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create", "list", "watch", "get", "update", "patch"]
{{- end }}
verbs: ["create", "list", "watch", "get", "update", "patch"]
2 changes: 0 additions & 2 deletions charts/hami/templates/scheduler/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.dra.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand Down Expand Up @@ -30,4 +29,3 @@ subjects:
name: {{ include "hami-vgpu.mock-device-plugin" . }}
namespace: {{ include "hami-vgpu.namespace" . }}
{{- end -}}
{{- end }}
2 changes: 0 additions & 2 deletions charts/hami/templates/scheduler/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.dra.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -34,4 +33,3 @@ spec:
app.kubernetes.io/component: hami-scheduler
hami.io/scheduler-role: leader
{{- include "hami-vgpu.selectorLabels" . | nindent 4 }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/hami/templates/scheduler/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.dra.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -15,4 +14,3 @@ metadata:
name: {{ include "hami-vgpu.mock-device-plugin" . }}
namespace: {{ include "hami-vgpu.namespace" . }}
{{- end -}}
{{- end }}
2 changes: 1 addition & 1 deletion charts/hami/templates/scheduler/webhook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.scheduler.admissionWebhook.enabled (not .Values.dra.enabled) -}}
{{- if .Values.scheduler.admissionWebhook.enabled -}}
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
Expand Down
18 changes: 0 additions & 18 deletions charts/hami/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -442,24 +442,6 @@ mockDevicePlugin:
## - myRegistryKeySecretName
##
pullSecrets: []
# If this option is enabled, the DRA will be installed and the scheduler extender will not be installed.
dra:
enabled: false

# Configuration for the hami-dra subchart, which includes DRA drivers.
# This is part of config for DRA, please refer to the DRA documentation for more details.
hami-dra:
monitor:
enabled: true
drivers:
nvidia:
enabled: true
# If you are using gpu driver on host, you need to set this to false
containerDriver: true
image:
repository: ghcr.io/project-hami/k8s-dra-driver
tag: "main"

devices:
amd:
customresources:
Expand Down
Loading