---
apiVersion: project.openshift.io/v1
kind: Project
metadata:
  name: udp-lb-class-ns
  labels:
    kubernetes.io/metadata.name: udp-lb-class-ns
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: udp-lb-class-dep
  namespace: udp-lb-class-ns
  labels:
    app: udp-lb-class-dep
spec:
  replicas: 2
  selector:
    matchLabels:
      app: udp-lb-class-dep
  template:
    metadata:
      labels:
        app: udp-lb-class-dep
    spec:
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      containers:
      - name: udp-test
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
        image: k8s.gcr.io/e2e-test-images/agnhost:2.36
        args:
          - netexec
          - --udp-port=8081
        ports:
        - containerPort: 8081
          protocol: UDP
---
# FIP should belong to external_subnet1 subnet (10.1.0.0/24).
apiVersion: v1
kind: Service
metadata:
  name: udp-lb-class1-svc
  namespace: udp-lb-class-ns
  annotations:
    loadbalancer.openstack.org/class: class1
  labels:
    app: udp-lb-class-dep
spec:
  ports:
  - port: 8082
    targetPort: 8081
    protocol: UDP
  selector:
    app: udp-lb-class-dep
  type: LoadBalancer
---
# FIP should belong to external_subnet2 subnet (10.2.0.0/24).
apiVersion: v1
kind: Service
metadata:
  name: udp-lb-class2-svc
  namespace: udp-lb-class-ns
  annotations:
    loadbalancer.openstack.org/class: class2
  labels:
    app: udp-lb-class-dep
spec:
  ports:
  - port: 8083
    targetPort: 8081
    protocol: UDP
  selector:
    app: udp-lb-class-dep
  type: LoadBalancer
---
# FIP should belong to external_subnet3 subnet (10.3.0.0/24).
apiVersion: v1
kind: Service
metadata:
  name: udp-lb-class3-svc
  namespace: udp-lb-class-ns
  annotations:
    loadbalancer.openstack.org/class: class3
  labels:
    app: udp-lb-class-dep
spec:
  ports:
  - port: 8084
    targetPort: 8081
    protocol: UDP
  selector:
    app: udp-lb-class-dep
  type: LoadBalancer
---
