apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  annotations:
    alm-examples: |-
      [
        {
          "apiVersion": "smartgateway.infra.watch/v2",
          "kind": "SmartGateway",
          "metadata": {
            "name": "demo"
          },
          "spec": {
            "applications": [
              {
                "config": "host: localhost\nport: 8081\nwithtimestamp: false\n",
                "name": "prometheus"
              }
            ],
            "blockEventBus": false,
            "bridge": {
              "amqpBlock": false,
              "amqpUrl": "amqp://amq-interconnect:5672/collectd",
              "enabled": true,
              "ringBufferCount": 15000,
              "ringBufferSize": 2048,
              "socketBlock": true,
              "statsPeriod": 60,
              "stopCount": 0,
              "unixSocketPath": "/tmp",
              "verbose": true
            },
            "handleErrors": false,
            "logLevel": "info",
            "pluginDir": "/usr/lib64/sg-core",
            "services": [
              {
                "name": "prometheus",
                "ports": [
                  {
                    "name": "prom-http",
                    "port": 8081,
                    "protocol": "TCP",
                    "targetPort": 8081
                  }
                ]
              }
            ],
            "size": 1,
            "transports": [
              {
                "config": "path: /tmp/smartgateway\n",
                "handlers": [
                  {
                    "config": "",
                    "name": "collectd-metrics"
                  }
                ],
                "name": "socket"
              }
            ]
          }
        }
      ]
    capabilities: Basic Install
    categories: Monitoring
    certified: "false"
    containerImage: <<OPERATOR_IMAGE>>:<<OPERATOR_TAG>>
    createdAt: <<CREATED_DATE>>
    description: Operator for managing the Smart Gateway Custom Resources, resulting
      in deployments of the Smart Gateway.
    olm.skipRange: =><<BUNDLE_OLM_SKIP_RANGE_LOWER_BOUND>> <<<OPERATOR_BUNDLE_VERSION>>
    "olm.properties": '[{"type": "olm.maxOpenShiftVersion", "value": "4.8"}]'
    operators.operatorframework.io/builder: operator-sdk-v0.19.4
    operators.operatorframework.io/project_layout: ansible
    repository: https://github.com/infrawatch/smart-gateway-operator
    support: Red Hat
  name: smart-gateway-operator.v1.99.0
  namespace: placeholder
spec:
  apiservicedefinitions: {}
  customresourcedefinitions:
    owned:
    - description: Instance of the Smart Gateway
      displayName: SmartGateway
      kind: SmartGateway
      name: smartgateways.smartgateway.infra.watch
      resources:
      - kind: Services
        name: ""
        version: v1
      - kind: SmartGateways
        name: smartgateways.smartgateway.infra.watch
        version: v2
      - kind: ServiceMonitors
        name: servicemonitors.monitoring.coreos.com
        version: v1
      version: v2
  description: |-
    # Smart Gateway for Service Telemetry Framework

    The Smart Gateway is middleware for OpenShift that takes metrics and events
    data streams from an AMQP 1.x message bus, and provides a method to having
    that data stream stored within supported data stores such as Prometheus and
    ElasticSearch.

    ## Core capabilities

    The Smart Gateway provides two modes:

    * metrics: provides an HTTP scrape endpoint for Prometheus
    * events: writes events directly to an ElasticSearch endpoint

    ## Operator features

    * **Two Service Types** - Supports the `metrics` and `events` service types which defines the type of Smart Gateway to be deployed

    * **Configuration** - Configuration of the Smart Gateway to allow for it to be connected to an AMQP 1.x bus and pointed at the appropriate storage mechanism based on service type.

    ## Before getting started

    1. Ensure an AMQP 1.x bus has been setup (such as AMQ Interconnect)
    2. If the Smart Gateway is running in events mode, be sure the ElasticSearch Operator and ElasticSearch instance have been pre-deployed.
  displayName: Smart Gateway Operator
  icon:
  - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpL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S41MDcxMjU0IDAgMCAwIDAsLTAuNTAyMzQgSCA3MS4yMzgxNSBhIDEuNTA3MTI1LDEuNTA3MTI1NCAwIDAgMCAtMC4yMDA5NTgsMC42MDI4NSB6IiAvPgo8L3N2Zz4K
    mediatype: image/svg+xml
  install:
    spec:
      deployments:
      - name: smart-gateway-operator
        spec:
          replicas: 1
          selector:
            matchLabels:
              app: smart-gateway-operator
          strategy: {}
          template:
            metadata:
              labels:
                app: smart-gateway-operator
            spec:
              containers:
              - env:
                - name: WATCH_NAMESPACE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.annotations['olm.targetNamespaces']
                - name: POD_NAME
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.name
                - name: OPERATOR_NAME
                  value: smart-gateway-operator
                - name: ANSIBLE_GATHERING
                  value: explicit
                - name: ANSIBLE_VERBOSITY_SMARTGATEWAY_SMARTGATEWAY_INFRA_WATCH
                  value: "4"
                - name: ANSIBLE_DEBUG_LOGS
                  value: "true"
                - name: RELATED_IMAGE_CORE_SMARTGATEWAY_IMAGE
                  value: <<RELATED_IMAGE_CORE_SMARTGATEWAY>>:<<RELATED_IMAGE_CORE_SMARTGATEWAY_TAG>>
                - name: RELATED_IMAGE_BRIDGE_SMARTGATEWAY_IMAGE
                  value: <<RELATED_IMAGE_BRIDGE_SMARTGATEWAY>>:<<RELATED_IMAGE_BRIDGE_SMARTGATEWAY_TAG>>
                image: <<OPERATOR_IMAGE>>:<<OPERATOR_TAG>>
                imagePullPolicy: Always
                name: operator
                resources: {}
                volumeMounts:
                - mountPath: /tmp/ansible-operator/runner
                  name: runner
              serviceAccountName: smart-gateway-operator
              volumes:
              - emptyDir: {}
                name: runner
      permissions:
      - rules:
        - apiGroups:
          - ""
          resources:
          - pods
          - services
          - services/finalizers
          - endpoints
          - persistentvolumeclaims
          - events
          - configmaps
          - secrets
          verbs:
          - create
          - delete
          - get
          - list
          - patch
          - update
          - watch
        - apiGroups:
          - apps
          resources:
          - deployments
          - daemonsets
          - replicasets
          - statefulsets
          verbs:
          - create
          - delete
          - get
          - list
          - patch
          - update
          - watch
        - apiGroups:
          - monitoring.coreos.com
          resources:
          - servicemonitors
          verbs:
          - get
          - create
        - apiGroups:
          - apps
          resourceNames:
          - smart-gateway-operator
          resources:
          - deployments/finalizers
          verbs:
          - update
        - apiGroups:
          - ""
          resources:
          - pods
          verbs:
          - get
        - apiGroups:
          - apps
          resources:
          - replicasets
          - deployments
          verbs:
          - get
        - apiGroups:
          - smartgateway.infra.watch
          resources:
          - '*'
          verbs:
          - create
          - delete
          - get
          - list
          - patch
          - update
          - watch
        serviceAccountName: smart-gateway-operator
    strategy: deployment
  installModes:
  - supported: true
    type: OwnNamespace
  - supported: true
    type: SingleNamespace
  - supported: false
    type: MultiNamespace
  - supported: false
    type: AllNamespaces
  keywords:
  - servicetelemetry
  - monitoring
  - telemetry
  - notifications
  - smartgateway
  labels:
    name: smart-gateway-operator
  links:
  - name: Source Code
    url: https://github.com/infrawatch/smart-gateway-operator
  maintainers:
  - email: support@redhat.com
    name: Red Hat
  maturity: stable
  minKubeVersion: 1.20.0
  provider:
    name: Red Hat
  selector:
    matchLabels:
      name: smart-gateway-operator
  version: 1.99.0
