apiVersion: apps/v1
kind: Deployment
metadata:
  name: base-workload-high-priority
  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:
      priorityClassName: kubecon-demo
      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
