apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  name: amq-broker-operator.v0.9.1
  namespace: placeholder
  annotations:
    categories: "Streaming & Messaging"
    certified: "false"
    description: AMQ Broker Operator provides the ability to deploy and manage stateful AMQ Broker broker clusters
    containerImage: registry.redhat.io/amq7/amq-broker-rhel7-operator:0.9
    createdAt: 2019-12-09T08:16:32Z
    capabilities: Basic Install
    repository: https://github.com/rh-messaging/amq-broker-operator
    support: Red Hat, Inc.
    tectonic-visibility: ocs
    alm-examples: >-
      [{
          "apiVersion": "broker.amq.io/v2alpha1",
          "kind": "ActiveMQArtemis",
          "metadata": {
              "name": "ex-aao"
          },
          "spec": {
              "deploymentPlan": {
                  "size": 1,
                  "image": "registry.redhat.io/amq7/amq-broker:7.5"
              }
          }
      },
      {
          "apiVersion": "broker.amq.io/v2alpha1",
          "kind": "ActiveMQArtemisAddress",
          "metadata": {
              "name": "ex-aaoaddress"
          },
          "spec": {
              "addressName": "myAddress0",
              "queueName": "myQueue0",
              "routingType": "anycast"
          }
      },
      {
          "apiVersion": "broker.amq.io/v2alpha1",
          "kind": "ActiveMQArtemisScaledown",
          "metadata": {
              "name": "ex-aaoscaledown"
          },
          "spec": {
              "localOnly": "true"
          }
      }]
labels:
  operator-activemqartemis: "true"
spec:
  displayName: AMQ Broker
  description: AMQ Broker Operator provides the ability to deploy and manage stateful AMQ Broker broker clusters
  keywords:
    - activemqartemis
    - operator
  version: 0.9.1
  maturity: alpha
  maintainers:
    - name: Red Hat, Inc.
      email: customerservice@redhat.com
  provider:
    name: Red Hat, Inc.
  links:
    - name: Product Page
      url: https://access.redhat.com/products/red-hat-amq/
    - name: Documentation
      url: https://access.redhat.com/documentation/en-us/red_hat_amq/
  icon:
    - base64data: [encoded data, 11816 characters]
      mediatype: image/png
  labels:
    alm-owner-amq-broker: amq-broker-operator
    operated-by: amq-broker-operator.v0.9.1
  selector:
    matchLabels:
      ActiveMQArtemis: ex-aao
      application: ex-aao-app
      operated-by: amq-broker-operator.v0.9.1
  installModes:
    - type: OwnNamespace
      supported: true
    - type: SingleNamespace
      supported: false
    - type: MultiNamespace
      supported: false
    - type: AllNamespaces
      supported: false
  customresourcedefinitions:
    owned:
      - name: activemqartemises.broker.amq.io
        version: v2alpha1
        versions:
          - name: v2alpha1
            served: true
            storage: true
          - name: v1alpha1
            served: false
            storage: false
        kind: ActiveMQArtemis
        description: An instance of Active MQ Artemis
        displayName: AMQ Broker
        resources:
          - kind: Service
            version: v1
          - kind: Route
            version: v1
          - kind: StatefulSet
            version: v1
          - kind: Secret
            version: v1
        specDescriptors:
          - description: User name for standard broker user. It is required for connecting to the broker and the web console. If left empty, it will be generated.
            displayName: AdminUser
            path: adminUser
          - description: Password for standard broker user. It is required for connecting to the broker and the web console. If left empty, it will be generated.
            displayName: AdminPassword
            path: adminPassword
          - description: The number of broker pods to deploy
            displayName: Size
            path: size
          - description: The image used for the broker deployment
            displayName: Image
            path: image
          - description: If true require user password login credentials for broker protocol ports
            displayName: RequireLogin
            path: requireLogin
          - description: If true use persistent volume via persistent volume claim for journal storage
            displayName: PersistenceEnabled
            path: persistenceEnabled
          - description: If aio use ASYNCIO, if nio use NIO for journal IO
            displayName: JournalType
            path: journalType
          - description: If true migrate messages on scaledown
            displayName: MessageMigration
            path: messageMigration
      - name: activemqartemisaddresses.broker.amq.io
        version: v2alpha1
        kind: ActiveMQArtemisAddress
        description: Adding and removing addresses via custom resource definitions
        displayName: AMQ Broker Address
        specDescriptors:
          - description: The Queue Name
            displayName: Queue Name
            path: queueName
          - description: The Address Name
            displayName: Address Name
            path: addressName
          - description: The Routing Type
            displayName: Routing Type
            path: routingType
      - name: activemqartemisscaledowns.broker.amq.io
        version: v2alpha1
        kind: ActiveMQArtemisScaledown
        description: Provides message migration on clustered broker scaledown
        displayName: AMQ Broker Scaledown
        specDescriptors:
          - description: Triggered by main ActiveMQArtemis CRD messageMigration entry
            displayName: LocalOnly
            path: localOnly
  install:
    strategy: deployment
    spec:
      permissions:
        - serviceAccountName: amq-broker-operator
          rules:
            - apiGroups:
                - ""
              resources:
                - pods
                - services
                - endpoints
                - persistentvolumeclaims
                - events
                - configmaps
                - secrets
                - routes
              verbs:
                - '*'
            - apiGroups:
                - ""
              resources:
                - namespaces
              verbs:
                - get
            - apiGroups:
                - apps
              resources:
                - deployments
                - daemonsets
                - replicasets
                - statefulsets
              verbs:
                - '*'
            - apiGroups:
                - monitoring.coreos.com
              resources:
                - servicemonitors
              verbs:
                - get
                - create
            - apiGroups:
                - broker.amq.io
              resources:
                - '*'
              verbs:
                - '*'
            - apiGroups:
                - "route.openshift.io"
              resources:
                - routes
                - routes/custom-host
                - routes/status
              verbs:
                - get
                - list
                - watch
                - create
                - delete

      deployments:
        - name: amq-broker-operator
          spec:
            replicas: 1
            selector:
              matchLabels:
                name: amq-broker-operator
            template:
              metadata:
                labels:
                  name: amq-broker-operator
              spec:
                serviceAccountName: amq-broker-operator
                containers:
                  - name: amq-broker-operator
                    image: registry.redhat.io/amq7/amq-broker-rhel7-operator:0.9
                    command:
                      -  /home/amq-broker-operator/bin/entrypoint
                    imagePullPolicy: Always
                    env:
                      - name: WATCH_NAMESPACE
                        valueFrom:
                          fieldRef:
                            fieldPath: metadata.namespace
                      - name: POD_NAME
                        valueFrom:
                          fieldRef:
                            fieldPath: metadata.name
                      - name: OPERATOR_NAME
                        value: "amq-broker-operator"
