---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: hostrules.ako.vmware.com
spec:
  conversion:
    strategy: None
  group: ako.vmware.com
  names:
    kind: HostRule
    listKind: HostRuleList
    plural: hostrules
    shortNames:
    - hostrule
    - hr
    singular: hostrule
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        properties:
          spec:
            properties:
              virtualhost:
                properties:
                  analyticsProfile:
                    type: string
                  applicationProfile:
                    type: string
                  enableVirtualHost:
                    type: boolean
                  errorPageProfile:
                    type: string
                  fqdn:
                    type: string
                  datascripts:
                    items:
                      type: string
                    type: array
                  httpPolicy:
                    properties:
                      overwrite:
                        type: boolean
                      policySets:
                        items:
                          type: string
                        type: array
                    type: object
                  gslb:
                    properties:
                      fqdn:
                        type: string
                    type: object
                  tls:
                    properties:
                      sslProfile:
                        type: string
                      sslKeyCertificate:
                        properties:
                          name:
                            type: string
                          type:
                            enum:
                            - ref
                            type: string
                        required:
                        - name
                        - type
                        type: object
                      termination:
                        enum:
                        - edge
                        type: string
                    required:
                    - sslKeyCertificate
                    type: object
                  wafPolicy:
                    type: string
                required:
                - fqdn
                type: object
            required:
            - virtualhost
            type: object
          status:
            properties:
              error:
                type: string
              status:
                type: string
            type: object
        type: object
    additionalPrinterColumns:
    - description: virtualhost for which the hostrule is valid
      jsonPath: .spec.virtualhost.fqdn
      name: Host
      type: string
    - description: status of the hostrule object
      jsonPath: .status.status
      name: Status
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    served: true
    storage: true
    subresources:
      status: {}
