UNCLASSIFIED

Commit b8775155 authored by Branden Cobb's avatar Branden Cobb
Browse files

Merge branch 'add-affinity-doc' into 'main'

add affinity documentation

See merge request !18
parents c0ccbc8d 3b66b754
Pipeline #215069 passed with stages
in 3 minutes and 46 seconds
# Affinity
* [kubernetes affinity ](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity)
Pod constraints for istio operator is implemented following the kubernetes affinity documentation. Istio Operator can constraint a pod using nodeSelector or Affinity/Antti-affinity feature
## nodeSelector
in the values.yaml add nodeSelector like:
```
nodeSelector:
<key>: <values>
```
## nodeAffinity
in the values of yaml. add nodeaffinity like:
```
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/e2e-az-name
operator: In
values:
- e2e-az1
- e2e-az2
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: another-node-label-key
operator: In
values:
- another-node-label-value
```
## podAffinity
in the values.yaml add pod affinity/antiaffinity like:
```
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: security
operator: In
values:
- S1
topologyKey: topology.kubernetes.io/zone
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: security
operator: In
values:
- S2
topologyKey: topology.kubernetes.io/zone
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment