# GENERATED FILE: edits made by hand will not be preserved.
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.5.0
    helm.sh/hook: crd-install
  labels:
    app.kubernetes.io/name: ambassador
    product: aes
  name: hosts.getambassador.io
spec:
  group: getambassador.io
  names:
    categories:
    - ambassador-crds
    kind: Host
    listKind: HostList
    plural: hosts
    singular: host
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.hostname
      name: Hostname
      type: string
    - jsonPath: .status.state
      name: State
      type: string
    - jsonPath: .status.phaseCompleted
      name: Phase Completed
      type: string
    - jsonPath: .status.phasePending
      name: Phase Pending
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v3alpha1
    schema:
      openAPIV3Schema:
        description: Host is the Schema for the hosts API
        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: HostSpec defines the desired state of Host
            properties:
              acmeProvider:
                description: Specifies whether/who to talk ACME with to automatically manage the $tlsSecret.
                properties:
                  authority:
                    description: Specifies who to talk ACME with to get certs. Defaults to Let's Encrypt; if "none" (case-insensitive), do not try to do ACME for this Host.
                    type: string
                  email:
                    type: string
                  privateKeySecret:
                    description: "Specifies the Kubernetes Secret to use to store the private key of the ACME account (essentially, where to store the auto-generated password for the auto-created ACME account).  You should not normally need to set this--the default value is based on a combination of the ACME authority being registered wit and the email address associated with the account. \n Note that this is a native-Kubernetes-style core.v1.LocalObjectReference, not an Ambassador-style `{name}.{namespace}` string.  Because we're opinionated, it does not support referencing a Secret in another namespace (because most native Kubernetes resources don't support that), but if we ever abandon that opinion and decide to support non-local references it, it would be by adding a `namespace:` field by changing it from a core.v1.LocalObjectReference to a core.v1.SecretReference, not by adopting the `{name}.{namespace}` notation."
                    properties:
                      name:
                        description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
                        type: string
                    type: object
                  registration:
                    description: This is normally set automatically
                    type: string
                type: object
              ambassador_id:
                description: Common to all Ambassador objects (and optional).
                items:
                  type: string
                type: array
              ambassadorId:
                description: A compatibility alias for "ambassador_id"; because Host used to be specified with protobuf, and jsonpb allowed either "ambassador_id" or "ambassadorId", and even though we didn't tell people about "ambassadorId" it's what the web policy console generated because of jsonpb.  So Hosts with 'ambassadorId' exist in the wild.
                items:
                  type: string
                type: array
              hostname:
                description: Hostname by which the Ambassador can be reached.
                type: string
              mappingSelector:
                description: Selector for Mappings we'll associate with this Host. At the moment, Selector and MappingSelector are synonyms, but that will change soon.
                properties:
                  matchExpressions:
                    description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
                    items:
                      description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
                      properties:
                        key:
                          description: key is the label key that the selector applies to.
                          type: string
                        operator:
                          description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
                          type: string
                        values:
                          description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
                          items:
                            type: string
                          type: array
                      required:
                      - key
                      - operator
                      type: object
                    type: array
                  matchLabels:
                    additionalProperties:
                      type: string
                    description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
                    type: object
                type: object
              previewUrl:
                description: Configuration for the Preview URL feature of Service Preview. Defaults to preview URLs not enabled.
                properties:
                  enabled:
                    description: Is the Preview URL feature enabled?
                    type: boolean
                  type:
                    description: What type of Preview URL is allowed?
                    enum:
                    - Path
                    type: string
                type: object
              requestPolicy:
                description: Request policy definition.
                properties:
                  insecure:
                    properties:
                      action:
                        enum:
                        - Redirect
                        - Reject
                        - Route
                        type: string
                      additionalPort:
                        type: integer
                    type: object
                type: object
              selector:
                description: 'DEPRECATED: Selector by which we can find further configuration. Use MappingSelector instead.'
                properties:
                  matchExpressions:
                    description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
                    items:
                      description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
                      properties:
                        key:
                          description: key is the label key that the selector applies to.
                          type: string
                        operator:
                          description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
                          type: string
                        values:
                          description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
                          items:
                            type: string
                          type: array
                      required:
                      - key
                      - operator
                      type: object
                    type: array
                  matchLabels:
                    additionalProperties:
                      type: string
                    description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
                    type: object
                type: object
              tls:
                description: TLS configuration.  It is not valid to specify both `tlsContext` and `tls`.
                properties:
                  alpn_protocols:
                    type: string
                  ca_secret:
                    type: string
                  cacert_chain_file:
                    type: string
                  cert_chain_file:
                    type: string
                  cert_required:
                    type: boolean
                  cipher_suites:
                    items:
                      type: string
                    type: array
                  ecdh_curves:
                    items:
                      type: string
                    type: array
                  max_tls_version:
                    type: string
                  min_tls_version:
                    type: string
                  private_key_file:
                    type: string
                  redirect_cleartext_from:
                    type: integer
                  sni:
                    type: string
                type: object
              tlsContext:
                description: "Name of the TLSContext the Host resource is linked with. It is not valid to specify both `tlsContext` and `tls`. \n Note that this is a native-Kubernetes-style core.v1.LocalObjectReference, not an Ambassador-style `{name}.{namespace}` string.  Because we're opinionated, it does not support referencing a Secret in another namespace (because most native Kubernetes resources don't support that), but if we ever abandon that opinion and decide to support non-local references it, it would be by adding a `namespace:` field by changing it from a core.v1.LocalObjectReference to a core.v1.SecretReference, not by adopting the `{name}.{namespace}` notation."
                properties:
                  name:
                    description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
                    type: string
                type: object
              tlsSecret:
                description: "Name of the Kubernetes secret into which to save generated certificates.  If ACME is enabled (see $acmeProvider), then the default is $hostname; otherwise the default is \"\".  If the value is \"\", then we do not do TLS for this Host. \n Note that this is a native-Kubernetes-style core.v1.LocalObjectReference, not an Ambassador-style `{name}.{namespace}` string.  Because we're opinionated, it does not support referencing a Secret in another namespace (because most native Kubernetes resources don't support that), but if we ever abandon that opinion and decide to support non-local references it, it would be by adding a `namespace:` field by changing it from a core.v1.LocalObjectReference to a core.v1.SecretReference, not by adopting the `{name}.{namespace}` notation."
                properties:
                  name:
                    description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
                    type: string
                type: object
            type: object
          status:
            description: HostStatus defines the observed state of Host
            properties:
              errorBackoff:
                type: string
              errorReason:
                description: errorReason, errorTimestamp, and errorBackoff are valid when state==Error.
                type: string
              errorTimestamp:
                format: date-time
                type: string
              phaseCompleted:
                description: phaseCompleted and phasePending are valid when state==Pending or state==Error.
                enum:
                - NA
                - DefaultsFilled
                - ACMEUserPrivateKeyCreated
                - ACMEUserRegistered
                - ACMECertificateChallenge
                type: string
              phasePending:
                description: phaseCompleted and phasePending are valid when state==Pending or state==Error.
                enum:
                - NA
                - DefaultsFilled
                - ACMEUserPrivateKeyCreated
                - ACMEUserRegistered
                - ACMECertificateChallenge
                type: string
              state:
                description: The first value listed in the Enum marker becomes the "zero" value, and it would be great if "Pending" could be the default value; but it's Important that the "zero" value be able to be shown as empty/omitted from display, and we really do want `kubectl get hosts` to say "Pending" in the "STATE" column, and not leave the column empty.
                enum:
                - Initial
                - Pending
                - Ready
                - Error
                type: string
              tlsCertificateSource:
                enum:
                - Unknown
                - None
                - Other
                - ACME
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
