apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: externalservices.eso.crowdfox.com
spec:
  group: eso.crowdfox.com
  names:
    kind: ExternalService
    listKind: ExternalServiceList
    plural: externalservices
    singular: externalservice
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: ExternalService is the Schema for the externalservices 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/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/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: ExternalServiceSpec defines the desired state of ExternalService
            properties:
              hosts:
                items:
                  properties:
                    host:
                      type: string
                    path:
                      type: string
                  required:
                  - host
                  - path
                  type: object
                type: array
              ips:
                items:
                  type: string
                type: array
              port:
                description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
                  Important: Run "operator-sdk generate k8s" to regenerate code after
                  modifying this file Add custom validation using kubebuilder tags:
                  https://book.kubebuilder.io/beyond_basics/generating_crd.html'
                format: int32
                type: integer
              readinessProbe:
                description: Probe describes a health check to be performed against
                  a container to determine whether it is alive or ready to receive
                  traffic.
                properties:
                  exec:
                    description: One and only one of the following should be specified.
                      Exec specifies the action to take.
                    properties:
                      command:
                        description: Command is the command line to execute inside
                          the container, the working directory for the command  is
                          root ('/') in the container's filesystem. The command is
                          simply exec'd, it is not run inside a shell, so traditional
                          shell instructions ('|', etc) won't work. To use a shell,
                          you need to explicitly call out to that shell. Exit status
                          of 0 is treated as live/healthy and non-zero is unhealthy.
                        items:
                          type: string
                        type: array
                    type: object
                  failureThreshold:
                    description: Minimum consecutive failures for the probe to be
                      considered failed after having succeeded. Defaults to 3. Minimum
                      value is 1.
                    format: int32
                    type: integer
                  httpGet:
                    description: HTTPGet specifies the http request to perform.
                    properties:
                      host:
                        description: Host name to connect to, defaults to the pod
                          IP. You probably want to set "Host" in httpHeaders instead.
                        type: string
                      httpHeaders:
                        description: Custom headers to set in the request. HTTP allows
                          repeated headers.
                        items:
                          description: HTTPHeader describes a custom header to be
                            used in HTTP probes
                          properties:
                            name:
                              description: The header field name
                              type: string
                            value:
                              description: The header field value
                              type: string
                          required:
                          - name
                          - value
                          type: object
                        type: array
                      path:
                        description: Path to access on the HTTP server.
                        type: string
                      port:
                        anyOf:
                        - type: integer
                        - type: string
                        description: Name or number of the port to access on the container.
                          Number must be in the range 1 to 65535. Name must be an
                          IANA_SVC_NAME.
                        x-kubernetes-int-or-string: true
                      scheme:
                        description: Scheme to use for connecting to the host. Defaults
                          to HTTP.
                        type: string
                    required:
                    - port
                    type: object
                  initialDelaySeconds:
                    description: 'Number of seconds after the container has started
                      before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
                    format: int32
                    type: integer
                  periodSeconds:
                    description: How often (in seconds) to perform the probe. Default
                      to 10 seconds. Minimum value is 1.
                    format: int32
                    type: integer
                  successThreshold:
                    description: Minimum consecutive successes for the probe to be
                      considered successful after having failed. Defaults to 1. Must
                      be 1 for liveness. Minimum value is 1.
                    format: int32
                    type: integer
                  tcpSocket:
                    description: 'TCPSocket specifies an action involving a TCP port.
                      TCP hooks not yet supported TODO: implement a realistic TCP
                      lifecycle hook'
                    properties:
                      host:
                        description: 'Optional: Host name to connect to, defaults
                          to the pod IP.'
                        type: string
                      port:
                        anyOf:
                        - type: integer
                        - type: string
                        description: Number or name of the port to access on the container.
                          Number must be in the range 1 to 65535. Name must be an
                          IANA_SVC_NAME.
                        x-kubernetes-int-or-string: true
                    required:
                    - port
                    type: object
                  timeoutSeconds:
                    description: 'Number of seconds after which the probe times out.
                      Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
                    format: int32
                    type: integer
                type: object
            required:
            - hosts
            - ips
            - port
            - readinessProbe
            type: object
          status:
            description: ExternalServiceStatus defines the observed state of ExternalService
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
