apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: egresses.crd.antrea.io
  labels:
    app: antrea
spec:
  group: crd.antrea.io
  versions:
  - name: v1alpha2
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        required:
        - spec
        properties:
          spec:
            type: object
            required:
            - appliedTo
            anyOf:
            - required:
              - egressIP
            - required:
              - externalIPPool
            properties:
              appliedTo:
                type: object
                properties:
                  podSelector:
                    type: object
                    properties:
                      matchExpressions:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            operator:
                              enum:
                                - In
                                - NotIn
                                - Exists
                                - DoesNotExist
                              type: string
                            values:
                              type: array
                              items:
                                type: string
                                pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
                      matchLabels:
                        x-kubernetes-preserve-unknown-fields: true
                  namespaceSelector:
                    type: object
                    properties:
                      matchExpressions:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            operator:
                              enum:
                                - In
                                - NotIn
                                - Exists
                                - DoesNotExist
                              type: string
                            values:
                              type: array
                              items:
                                type: string
                                pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
                      matchLabels:
                        x-kubernetes-preserve-unknown-fields: true
              egressIP:
                type: string
                oneOf:
                - format: ipv4
                - format: ipv6
              externalIPPool:
                type: string
          status:
            type: object
            properties:
              egressNode:
                type: string
    additionalPrinterColumns:
    - description: Specifies the SNAT IP address for the selected workloads.
      jsonPath: .spec.egressIP
      name: EgressIP
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    - description: The Owner Node of egress IP
      jsonPath: .status.egressNode
      name: Node
      type: string
    subresources:
      status: {}
  scope: Cluster
  names:
    plural: egresses
    singular: egress
    kind: Egress
    shortNames:
    - eg
