Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

add GPU ExtendedResourceToleration admission controller support #3181

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
k8s-app: nvidia-gpu-device-plugin
k8s-app: nvidia-device-plugin
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
name: nvidia-gpu-device-plugin
name: nvidia-device-plugin
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: nvidia-gpu-device-plugin
k8s-app: nvidia-device-plugin
updateStrategy:
type: RollingUpdate
template:
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
labels:
k8s-app: nvidia-gpu-device-plugin
k8s-app: nvidia-device-plugin
spec:
priorityClassName: system-node-critical
affinity:
Expand Down
2 changes: 1 addition & 1 deletion parts/k8s/kubernetesmastercustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ MASTER_ARTIFACTS_CONFIG_PLACEHOLDER
{{end}}

{{if IsNVIDIADevicePluginEnabled}}
sed -i "s|<kubernetesNVIDIADevicePluginSpec>|{{WrapAsVariable "kubernetesNVIDIADevicePluginSpec"}}|g" "/etc/kubernetes/addons/nvidia-gpu-device-plugin.yaml"
sed -i "s|<kubernetesNVIDIADevicePluginSpec>|{{WrapAsVariable "kubernetesNVIDIADevicePluginSpec"}}|g" "/etc/kubernetes/addons/nvidia-device-plugin.yaml"
{{end}}

{{if EnableDataEncryptionAtRest }}
Expand Down
4 changes: 2 additions & 2 deletions pkg/acsengine/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func kubernetesAddonSettingsInit(profile *api.Properties) []kubernetesFeatureSet
true,
},
{
"kubernetesmasteraddons-nvidia-gpu-device-plugin-daemonset.yaml",
"nvidia-gpu-device-plugin.yaml",
"kubernetesmasteraddons-nvidia-device-plugin-daemonset.yaml",
"nvidia-device-plugin.yaml",
profile.IsNVIDIADevicePluginEnabled(),
},
{
Expand Down
90 changes: 46 additions & 44 deletions pkg/acsengine/k8s_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,32 @@ import (

var k8sComponentVersions = map[string]map[string]string{
"1.11": {
"dockerEngine": "1.13.*",
"dashboard": "kubernetes-dashboard-amd64:v1.8.3",
"exechealthz": "exechealthz-amd64:1.2",
"addon-resizer": "addon-resizer:1.8.1",
"heapster": "heapster-amd64:v1.5.1",
"metrics-server": "metrics-server-amd64:v0.2.1",
"kube-dns": "k8s-dns-kube-dns-amd64:1.14.8",
"addon-manager": "kube-addon-manager-amd64:v8.6",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.8",
"pause": "pause-amd64:3.1",
"tiller": "tiller:v2.8.1",
"rescheduler": "rescheduler:v0.3.1",
"aci-connector": "virtual-kubelet:latest",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
"routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod,
"backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries),
"backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64),
"backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration),
"backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64),
"ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64),
"ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket),
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
"dockerEngine": "1.13.*",
"dashboard": "kubernetes-dashboard-amd64:v1.8.3",
"exechealthz": "exechealthz-amd64:1.2",
"addon-resizer": "addon-resizer:1.8.1",
"heapster": "heapster-amd64:v1.5.1",
"metrics-server": "metrics-server-amd64:v0.2.1",
"kube-dns": "k8s-dns-kube-dns-amd64:1.14.8",
"addon-manager": "kube-addon-manager-amd64:v8.6",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.8",
"pause": "pause-amd64:3.1",
"tiller": "tiller:v2.8.1",
"rescheduler": "rescheduler:v0.3.1",
"aci-connector": "virtual-kubelet:latest",
"nvidia-device-plugin": "k8s-device-plugin:1.10",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
"routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod,
"backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries),
"backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64),
"backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration),
"backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64),
"ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64),
"ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket),
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
},
"1.10": {
"dockerEngine": "1.13.*",
Expand Down Expand Up @@ -243,25 +244,26 @@ func getK8sVersionComponents(version string, overrides map[string]string) map[st
"addonresizer": k8sComponentVersions["1.11"]["addon-resizer"],
"heapster": k8sComponentVersions["1.11"]["heapster"],
DefaultMetricsServerAddonName: k8sComponentVersions["1.11"]["metrics-server"],
"dns": k8sComponentVersions["1.11"]["kube-dns"],
"addonmanager": k8sComponentVersions["1.11"]["addon-manager"],
"dnsmasq": k8sComponentVersions["1.11"]["dnsmasq"],
"pause": k8sComponentVersions["1.11"]["pause"],
DefaultTillerAddonName: k8sComponentVersions["1.11"]["tiller"],
DefaultReschedulerAddonName: k8sComponentVersions["1.11"]["rescheduler"],
DefaultACIConnectorAddonName: k8sComponentVersions["1.11"]["aci-connector"],
"nodestatusfreq": k8sComponentVersions["1.11"]["nodestatusfreq"],
"nodegraceperiod": k8sComponentVersions["1.11"]["nodegraceperiod"],
"podeviction": k8sComponentVersions["1.11"]["podeviction"],
"routeperiod": k8sComponentVersions["1.11"]["routeperiod"],
"backoffretries": k8sComponentVersions["1.11"]["backoffretries"],
"backoffjitter": k8sComponentVersions["1.11"]["backoffjitter"],
"backoffduration": k8sComponentVersions["1.11"]["backoffduration"],
"backoffexponent": k8sComponentVersions["1.11"]["backoffexponent"],
"ratelimitqps": k8sComponentVersions["1.11"]["ratelimitqps"],
"ratelimitbucket": k8sComponentVersions["1.11"]["ratelimitbucket"],
"gchighthreshold": k8sComponentVersions["1.11"]["gchighthreshold"],
"gclowthreshold": k8sComponentVersions["1.11"]["gclowthreshold"],
"dns": k8sComponentVersions["1.11"]["kube-dns"],
"addonmanager": k8sComponentVersions["1.11"]["addon-manager"],
"dnsmasq": k8sComponentVersions["1.11"]["dnsmasq"],
"pause": k8sComponentVersions["1.11"]["pause"],
DefaultTillerAddonName: k8sComponentVersions["1.11"]["tiller"],
DefaultReschedulerAddonName: k8sComponentVersions["1.11"]["rescheduler"],
DefaultACIConnectorAddonName: k8sComponentVersions["1.11"]["aci-connector"],
"nodestatusfreq": k8sComponentVersions["1.11"]["nodestatusfreq"],
"nodegraceperiod": k8sComponentVersions["1.11"]["nodegraceperiod"],
"podeviction": k8sComponentVersions["1.11"]["podeviction"],
"routeperiod": k8sComponentVersions["1.11"]["routeperiod"],
"backoffretries": k8sComponentVersions["1.11"]["backoffretries"],
"backoffjitter": k8sComponentVersions["1.11"]["backoffjitter"],
"backoffduration": k8sComponentVersions["1.11"]["backoffduration"],
"backoffexponent": k8sComponentVersions["1.11"]["backoffexponent"],
"ratelimitqps": k8sComponentVersions["1.11"]["ratelimitqps"],
"ratelimitbucket": k8sComponentVersions["1.11"]["ratelimitbucket"],
"gchighthreshold": k8sComponentVersions["1.11"]["gchighthreshold"],
"gclowthreshold": k8sComponentVersions["1.11"]["gclowthreshold"],
DefaultNVIDIADevicePluginAddonName: k8sComponentVersions["1.11"]["nvidia-device-plugin"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, does NDP v1.10 work in k8s 1.11? when i tested NDP v1.9 with k8s 1.10 a while back, it didn't work

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears to work the same way it does in 1.10

}
case "1.10":
ret = map[string]string{
Expand Down