
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: namespaceegressrules.kubeovn.io
spec:
  scope: Namespaced
  group: kubeovn.io
  names:
    kind: NamespaceEgressRule
    listKind: NamespaceEgressRuleList
    plural: namespaceegressrules
    singular: namespaceegressrule
    shortNames:
      - nsgr
  versions:
    - name: v1alpha1
      served: true
      storage: true
      additionalPrinterColumns:
        - name: Action
          type: string
          jsonPath: .spec.action
        - name: Status
          type: string
          jsonPath: .status.phase
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required:
                - action
                - externalServices
              properties:
                action:
                  type: string
                  enum:
                    - accept
                    - drop
                    - accept-decisively
                    - reject
                logging:
                  type: boolean
                externalServices:
                  type: array
                  items:
                    type: string
            status:
              properties:
                phase:
                  type: string
              type: object
      subresources:
        status: {}


