How to specify the PV storageClassName while deploying AMQ Broker as template ?

Solution Verified - Updated -

Issue

  • I am deploying the AMQ broker on OpenShift 4.3 via the provided CR, which I have converted to a template. I have installed the Operator via the OperatorHub.I am deploying the AMQ broker on OpenShift 4.3 via the provided CR, which I have converted to a template. I have installed the Operator via the OperatorHub.
  • I want to enable persistence, although when I do so, I receive an PVC event error about no storage class being set. I want to set the default storage class for all PVs created through the CR deployment, although after looking through the documentation, I have not found a solution for this.
  • Is there anywhere in the broker instance deployment files where I can specify this storage class name?
  • Here is my template file
apiVersion: v1
kind: Template
parameters:
  - description: All Kubernetes resources will be named after the broker name
    displayName: Name of the broker
    name: BROKER_NAME
    value: amq-broker
  - description: The number of brokers. 2 or more required for a clustered setup.
    displayName: Number of brokers
    name: BROKER_COUNT
    value: "1"
  - description: Enable broker persistence
    displayName: Enable broker persistence
    name: ENABLE_PERSISTENCE
    value: "true"
  - description: Enable SSL
    displayName: Enable SSL
    name: ENABLE_SSL
    value: "false"
objects:
  - apiVersion: broker.amq.io/v2alpha1
    kind: ActiveMQArtemis
    metadata:
      name: ${BROKER_NAME}
      application: ${BROKER_NAME}
    spec:
      deploymentPlan:
        size: ${{BROKER_COUNT}}
        image: 'registry.redhat.io/amq7/amq-broker:7.5'
        persistenceEnabled: ${{ENABLE_PERSISTENCE}}
        messageMigration: ${{ENABLE_PERSISTENCE}}
      acceptors:
        - name: amqp
          protocols: amqp
          port: 5672
          sslEnabled: false

Environment

  • Red Hat AMQ
    • 7.5.0 on OpenShift

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content