apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  # name must match the spec fields below, and be in the form: <plural>.<group>
  name: routes.route.openshift.io
spec:
  # group name to use for REST API: /apis/<group>/<version>
  group: route.openshift.io
  # list of versions supported by this CustomResourceDefinition
  versions:
    - name: v1
      # Each version can be enabled/disabled by Served flag.
      served: true
      # One and only one version must be marked as the storage version.
      storage: true
  # either Namespaced or Cluster
  scope: Namespaced
  subresources:
    # enable spec/status
    status: {}
  names:
    # plural name to be used in the URL: /apis/<group>/<version>/<plural>
    plural: routes
    # singular name to be used as an alias on the CLI and for display
    singular: route
    # kind is normally the CamelCased singular type. Your resource manifests use this.
    kind: Route
  additionalPrinterColumns:
  - name: Host
    type: string
    JSONPath: .status.ingress[0].host
  - name: Admitted
    type: string
    JSONPath: .status.ingress[0].conditions[?(@.type=="Admitted")].status
  - name: Service
    type: string
    JSONPath: .spec.to.name
  - name: TLS
    type: string
    JSONPath: .spec.tls.type
