|
| 1 | +import { K8sIoApiCoreV1Affinity } from '../models/K8sIoApiCoreV1Affinity'; |
| 2 | +import { K8sIoApiCoreV1NodeSelectorRequirementOperatorEnum } from '../models/K8sIoApiCoreV1NodeSelectorRequirement'; |
| 3 | + |
| 4 | +export const testObject: K8sIoApiCoreV1Affinity = { |
| 5 | + nodeAffinity: { |
| 6 | + preferredDuringSchedulingIgnoredDuringExecution: [ |
| 7 | + { |
| 8 | + preference: { |
| 9 | + matchExpressions: [ |
| 10 | + { |
| 11 | + key: 'test-key', |
| 12 | + operator: K8sIoApiCoreV1NodeSelectorRequirementOperatorEnum.In, |
| 13 | + values: ['test-value'], |
| 14 | + }, |
| 15 | + ], |
| 16 | + matchFields: [ |
| 17 | + { |
| 18 | + key: 'test-field-key', |
| 19 | + operator: K8sIoApiCoreV1NodeSelectorRequirementOperatorEnum.Exists, |
| 20 | + }, |
| 21 | + ], |
| 22 | + }, |
| 23 | + weight: 100, |
| 24 | + }, |
| 25 | + ], |
| 26 | + requiredDuringSchedulingIgnoredDuringExecution: { |
| 27 | + nodeSelectorTerms: [ |
| 28 | + { |
| 29 | + matchExpressions: [ |
| 30 | + { |
| 31 | + key: 'test-required-key', |
| 32 | + operator: K8sIoApiCoreV1NodeSelectorRequirementOperatorEnum.NotIn, |
| 33 | + values: ['test-excluded-value'], |
| 34 | + }, |
| 35 | + ], |
| 36 | + }, |
| 37 | + ], |
| 38 | + }, |
| 39 | + }, |
| 40 | + podAffinity: { |
| 41 | + preferredDuringSchedulingIgnoredDuringExecution: [ |
| 42 | + { |
| 43 | + podAffinityTerm: { |
| 44 | + topologyKey: 'kubernetes.io/hostname', |
| 45 | + labelSelector: { |
| 46 | + matchLabels: { app: 'test-app' }, |
| 47 | + matchExpressions: [ |
| 48 | + { |
| 49 | + key: 'environment', |
| 50 | + operator: 'In', |
| 51 | + values: ['production'], |
| 52 | + }, |
| 53 | + ], |
| 54 | + }, |
| 55 | + matchLabelKeys: ['pod-template-hash'], |
| 56 | + mismatchLabelKeys: ['version'], |
| 57 | + namespaceSelector: { |
| 58 | + matchLabels: { team: 'test-team' }, |
| 59 | + }, |
| 60 | + namespaces: ['test-namespace'], |
| 61 | + }, |
| 62 | + weight: 50, |
| 63 | + }, |
| 64 | + ], |
| 65 | + requiredDuringSchedulingIgnoredDuringExecution: [ |
| 66 | + { |
| 67 | + topologyKey: 'topology.kubernetes.io/zone', |
| 68 | + labelSelector: { |
| 69 | + matchLabels: { service: 'test-service' }, |
| 70 | + }, |
| 71 | + }, |
| 72 | + ], |
| 73 | + }, |
| 74 | + podAntiAffinity: { |
| 75 | + preferredDuringSchedulingIgnoredDuringExecution: [ |
| 76 | + { |
| 77 | + podAffinityTerm: { |
| 78 | + topologyKey: 'kubernetes.io/hostname', |
| 79 | + labelSelector: { |
| 80 | + matchLabels: { app: 'test-app' }, |
| 81 | + }, |
| 82 | + }, |
| 83 | + weight: 75, |
| 84 | + }, |
| 85 | + ], |
| 86 | + requiredDuringSchedulingIgnoredDuringExecution: [ |
| 87 | + { |
| 88 | + topologyKey: 'topology.kubernetes.io/zone', |
| 89 | + labelSelector: { |
| 90 | + matchLabels: { app: 'test-app' }, |
| 91 | + }, |
| 92 | + }, |
| 93 | + ], |
| 94 | + }, |
| 95 | +}; |
0 commit comments