{{- if .Values.ingressOperator.create }}
{{- if .Values.createCRDs }}

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.4.0
  creationTimestamp: null
  name: functioningresses.openfaas.com
spec:
  group: openfaas.com
  names:
    kind: FunctionIngress
    listKind: FunctionIngressList
    plural: functioningresses
    singular: functioningress
  scope: Namespaced
  versions:
  - name: v1alpha2
    schema:
      openAPIV3Schema:
        description: FunctionIngress describes an OpenFaaS function
        type: object
        required:
        - spec
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: FunctionIngressSpec is the spec for a FunctionIngress resource.
              It must be created in the same namespace as the gateway, i.e. openfaas.
            type: object
            required:
            - domain
            - function
            properties:
              bypassGateway:
                description: BypassGateway, when true creates an Ingress record directly
                  for the Function name without using the gateway in the hot path
                type: boolean
              domain:
                description: Domain such as "api.example.com"
                type: string
              function:
                description: Function such as "nodeinfo"
                type: string
              ingressType:
                description: IngressType such as "nginx"
                type: string
              path:
                description: Path such as "/v1/profiles/view/(.*)", or leave empty
                  for default
                type: string
              tls:
                description: Enable TLS via cert-manager
                type: object
                properties:
                  enabled:
                    type: boolean
                  issuerRef:
                    description: ObjectReference is a reference to an object with
                      a given name and kind.
                    type: object
                    required:
                    - name
                    properties:
                      kind:
                        type: string
                      name:
                        type: string
    served: true
    storage: true
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []

---

{{- end }}
{{- end }}