Skip to content

Instantly share code, notes, and snippets.

@chrismessiah
Last active July 7, 2023 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismessiah/cc936d1a24a0ea9c1063de15c9ecbaa6 to your computer and use it in GitHub Desktop.
Save chrismessiah/cc936d1a24a0ea9c1063de15c9ecbaa6 to your computer and use it in GitHub Desktop.
# Class P
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
namespaces: ["default"]
labelSelector:
matchExpressions:
- key: non-existing-key
operator: DoesNotExist
# Class PG
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
class-pg-group-1: foobar
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchExpressions:
- key: class-pg-group-1
operator: DoesNotExist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment