apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  creationTimestamp: null
  name: smartgateways.smartgateway.infra.watch
spec:
  conversion:
    strategy: None
  group: smartgateway.infra.watch
  names:
    kind: SmartGateway
    listKind: SmartGatewayList
    plural: smartgateways
    shortNames:
    - sg
    singular: smartgateway
  scope: Namespaced
  versions:
  - name: v2
    schema:
      openAPIV3Schema:
        description: SmartGateway represents an instance of the Smart Gateway used
          with Service Telemetry Framework.
        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://github.com/kubernetes/community/blob/master/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://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: 'SmartGatewaySpec is a specification of the desired behavior
              of the Smartgateway deployment. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
            properties:
              applications:
                description: Applications to load.
                items:
                  properties:
                    config:
                      description: Free form configuration for the application.
                      type: string
                    name:
                      description: Name of the application.
                      type: string
                  type: object
                type: array
              blockEventBus:
                description: Enables event bus blocking for sg-core. Defaults to false.
                type: string
              bridge:
                description: AMQP1 bridge configuration options
                properties:
                  amqpBlock:
                    description: Enables amqp blocking for sg-bridge. Defaults to
                      false.
                    type: boolean
                  amqpUrl:
                    description: URL of the AMQP endpoint. Format of ^amqp://(([a-z]+)(:([a-z]+))*@)*([a-zA-Z_0-9.-]+)(:([0-9]+))*(.+)$.
                      Defaults to amqp://127.0.0.1:5672/collectd/telemetry.
                    pattern: ^amqp://(([a-z]+)(:([a-z]+))*@)*([a-zA-Z_0-9.-]+)(:([0-9]+))*(.+)$
                    type: string
                  containerIdPattern:
                    description: AMQP container ID (should be unique). Defaults to
                      "sa-%x".
                    type: string
                  enabled:
                    description: Whether to enable the bridge for connection to AMQP.
                      Defaults to true.
                    type: boolean
                  inetTarget:
                    description: Connect to gateway with inet socket. Defaults to
                      127.0.0.1:30000.
                    type: string
                  ringBufferCount:
                    description: Number of message buffers between AMQP and Outgoing.
                      Defaults to 15000.
                    type: integer
                  ringBufferSize:
                    description: Size of a message buffer between AMQP and Outgoing.
                      Defaults to 2048.
                    type: integer
                  socketBlock:
                    description: Outgoing socket connection will block. Defaults to
                      true.
                    type: boolean
                  statsPeriod:
                    description: How often to print stats, 0 for no stats. Value is
                      in seconds. Defaults to 60.
                    type: integer
                  stopCount:
                    description: Number of AMQP mesg to rcv before exit, 0 for continous.
                      Defaults to 0.
                    type: integer
                  unixSocketPath:
                    description: Connect to gateway with unix socket. Defaults to
                      /tmp with 'smartgateway' appended as the final path, e.g. /tmp/smartgateway.
                    type: string
                  verbose:
                    description: Print extra info, multiple instance increase verbosity.
                      Defaults to true.
                    type: boolean
                type: object
              bridgeContainerImagePath:
                description: Registry path to bridge container image.
                type: string
              coreContainerImagePath:
                description: Registry path to the sg-core container image.
                type: string
              handleErrors:
                description: Tell handlers to send errors to event bus.
                type: boolean
              logLevel:
                description: Log level for sg-core.
                type: string
              pluginDir:
                description: Plugin directory path.
                type: string
              services:
                description: Services that should be created for this Smart Gateway
                items:
                  properties:
                    name:
                      description: Postfix of the service name
                      type: string
                    ports:
                      description: Ports to create for this service
                      items:
                        properties:
                          name:
                            description: Port name
                            type: string
                          port:
                            description: Port number to expose
                            type: integer
                          protocol:
                            description: Protocol for this service
                            type: string
                          targetPort:
                            description: Target port for service
                            type: integer
                        type: object
                      type: array
                  type: object
                type: array
              size:
                description: Number of Smart Gateway instances to deploy. This number
                  should always be a value of 1.
                type: integer
              transports:
                description: Transports to enable.
                items:
                  properties:
                    config:
                      description: Free form configuration for plugins.
                      type: string
                    handlers:
                      description: List of handler plugins to load for this transport.
                      items:
                        properties:
                          config:
                            description: Free form configuration for handler.
                            type: string
                          name:
                            description: Name of the handler to load.
                            type: string
                        type: object
                      type: array
                    name:
                      description: Name of the transport to load.
                      type: string
                  type: object
                type: array
            type: object
          status:
            description: Status results of an instance of Smart Gateway
            properties:
              conditions:
                description: The resulting conditions when a Smart Gateway is instantiated
                items:
                  properties:
                    lastTransitionTime:
                      type: string
                    reason:
                      type: string
                    status:
                      type: string
                    type:
                      type: string
                  type: object
                type: array
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: null
  storedVersions: null
