---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
  name: kubecon-demo
value: 20241113
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: marker-pod
  labels:
    app: kubecon-demo
    component: marker-pod
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kubecon-demo
      component: marker-pod
  template:
    metadata:
      labels:
        app: kubecon-demo
        component: marker-pod
    spec:
      containers:
      - name: demo
        image: registry.k8s.io/pause:3.7
        resources:
          requests:
            memory: 64M
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: base-workload
  labels:
    app: kubecon-demo
    component: base-workload
spec:
  selector:
    matchLabels:
      app: kubecon-demo
      component: base-workload
  template:
    metadata:
      labels:
        app: kubecon-demo
        component: base-workload
    spec:
      affinity:
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - "kubecon-demo"
              - key: component
                operator: In
                values:
                - "marker-pod"
            topologyKey: kubernetes.io/hostname
      containers:
      - name: demo
        image: registry.k8s.io/pause:3.7
        resources:
          requests:
            memory: 256M
