apiVersion: apps/v1
kind: Deployment
metadata:
  name: traffic-monitor
  labels:
    app: traffic-monitor
spec:
  replicas: 3
  selector:
    matchLabels:
      app: traffic-monitor
  template:
    metadata:
      labels:
        app: traffic-monitor
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/hostname
                    operator: In
                    values:
                      - node-tokyo-1
                      - node-tokyo-2
                      - seoul-amd64-01
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - traffic-monitor
                topologyKey: labels
              weight: 100
      containers:
        - name: traffic-monitor
          image: traffmonetizer/cli
          args:
            - start
            - accept
            - --token
            - xKJVbdxYMnsRmuCMilCul/S4VWJHz6xpaCnLf355AFU=

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: traffic-monitor-arm
  labels:
    app: traffic-monitor-arm
spec:
  replicas: 2
  selector:
    matchLabels:
      app: traffic-monitor-arm
  template:
    metadata:
      labels:
        app: traffic-monitor-arm
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/arch
                    operator: In
                    values:
                      - arm64
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - traffic-monitor-arm
                topologyKey: labels
              weight: 100
      containers:
        - name: traffic-monitor
          image: traffmonetizer/cli:arm64v8
          args:
            - start
            - accept
            - --token
            - xKJVbdxYMnsRmuCMilCul/S4VWJHz6xpaCnLf355AFU=

