b5f6df9926
* Consolidate YAML files [part-8] This PR exacts the YAML files referenced from the following subdirs: - docs/concepts/workloads - docs/concepts/configuration - docs/concepts/policy The following problems are fixed: - docs/concepts/workloads/controllers/ doesnt have a 'cronjob.yaml for test - the exactly same `pod.yaml` was used in both the task/config-pod-container topic and the concepts/configuration topics. * Update examples_test.go * Add missing yaml file.
30 lines
741 B
YAML
30 lines
741 B
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: with-pod-affinity
|
|
spec:
|
|
affinity:
|
|
podAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- labelSelector:
|
|
matchExpressions:
|
|
- key: security
|
|
operator: In
|
|
values:
|
|
- S1
|
|
topologyKey: failure-domain.beta.kubernetes.io/zone
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: security
|
|
operator: In
|
|
values:
|
|
- S2
|
|
topologyKey: kubernetes.io/hostname
|
|
containers:
|
|
- name: with-pod-affinity
|
|
image: k8s.gcr.io/pause:2.0
|