Issue #39: Add affinity for arm/arm64 support for arm-exporter.

This commit is contained in:
Jeff Geerling 2020-05-23 20:43:47 -05:00
parent 8882eb5e78
commit 9d3076bf66

View File

@ -72,7 +72,7 @@ local utils = import 'utils.libsonnet';
daemonset.mixin.metadata.withLabels(podLabels) + daemonset.mixin.metadata.withLabels(podLabels) +
daemonset.mixin.spec.selector.withMatchLabels(podLabels) + daemonset.mixin.spec.selector.withMatchLabels(podLabels) +
daemonset.mixin.spec.template.metadata.withLabels(podLabels) + daemonset.mixin.spec.template.metadata.withLabels(podLabels) +
daemonset.mixin.spec.template.spec.withNodeSelector({ 'beta.kubernetes.io/arch': 'arm64' }) + daemonset.mixin.spec.template.spec.withAffinity({'nodeAffinity':{'requiredDuringSchedulingIgnoredDuringExecution':{'nodeSelectorTerms':[{'matchExpressions':[{'key':'kubernetes.io/arch','operator':'In','values':['arm','arm64']}]}]}}}) +
daemonset.mixin.spec.template.spec.withServiceAccountName('arm-exporter') + daemonset.mixin.spec.template.spec.withServiceAccountName('arm-exporter') +
daemonset.mixin.spec.template.spec.withContainers(c), daemonset.mixin.spec.template.spec.withContainers(c),