|
38 | 38 | daemonset:
|
39 | 39 | daemonSet.new('node-termination-handler', [self.container]) +
|
40 | 40 | daemonSet.mixin.spec.template.spec.withServiceAccount(self.service_account.metadata.name) +
|
41 |
| - daemonSet.mixin.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.mixinInstance( |
42 |
| - nodeSelector.withNodeSelectorTerms([ |
| 41 | + daemonSet.mixin.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.withNodeSelectorTerms( |
| 42 | + [ |
43 | 43 | nodeSelector.nodeSelectorTermsType.new() +
|
44 | 44 | nodeSelector.nodeSelectorTermsType.withMatchExpressions([
|
45 |
| - nodeSelector.nodeSelectorTermsType.matchFieldsType |
46 |
| - .withKey('cloud.google.com/gke-accelerator') |
47 |
| - .withOperator('Exists'), |
| 45 | + nodeSelector.nodeSelectorTermsType.matchFieldsType.withKey('cloud.google.com/gke-accelerator') |
| 46 | + + nodeSelector.nodeSelectorTermsType.matchFieldsType.withOperator('Exists'), |
48 | 47 | ]),
|
49 | 48 | nodeSelector.nodeSelectorTermsType.new() +
|
50 | 49 | nodeSelector.nodeSelectorTermsType.withMatchExpressions([
|
51 |
| - nodeSelector.nodeSelectorTermsType.matchFieldsType |
52 |
| - .withKey('cloud.google.com/gke-preemptible') |
53 |
| - .withOperator('Exists'), |
| 50 | + nodeSelector.nodeSelectorTermsType.matchFieldsType.withKey('cloud.google.com/gke-preemptible') |
| 51 | + + nodeSelector.nodeSelectorTermsType.matchFieldsType.withOperator('Exists'), |
54 | 52 | ]),
|
55 |
| - ]) |
| 53 | + ] |
56 | 54 | ) +
|
57 | 55 | daemonSet.mixin.metadata.withNamespace(_config.namespace) +
|
58 | 56 | daemonSet.mixin.spec.template.spec.withHostPid(true) +
|
59 | 57 | daemonSet.mixin.spec.template.spec.withTolerations([
|
60 | 58 | tolerations.new() +
|
61 |
| - tolerations |
62 |
| - .withOperator('Exists') |
63 |
| - .withEffect('NoSchedule'), |
| 59 | + tolerations.withOperator('Exists') + |
| 60 | + tolerations.withEffect('NoSchedule'), |
| 61 | + |
64 | 62 | tolerations.new() +
|
65 |
| - tolerations |
66 |
| - .withOperator('Exists') |
67 |
| - .withEffect('NoExecute'), |
| 63 | + tolerations.withOperator('Exists') + |
| 64 | + tolerations.withEffect('NoExecute'), |
68 | 65 | ]),
|
69 | 66 |
|
70 | 67 | local serviceAccount = k.core.v1.serviceAccount,
|
|
0 commit comments