Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Get a local copy of the hivemq-operator Helm chart. This will create a directory “./hivemq-operator" in your working directory:

    Code Block
    languagebash
    helm pull hivemq/hivemq-operator --untar
  2. Go to the ./hivemq-operator/operator-tmpls and make a copy of the cluster-stateful-set.yaml in the same directory:

    Code Block
    languagebash
    cd ./hivemq-operator/operator-tmpls
    cp cluster-stateful-set.yaml my-cluster-stateful-set.yaml
  3. Update the configuration of the liveness and readiness probe from this:

    Code Block
    languageyaml
              readinessProbe:
                exec:
                  command:
                    - /opt/hivemq/bin/readiness_probe.sh
                initialDelaySeconds: 3
                periodSeconds: 5
              livenessProbe:
                tcpSocket:
                  port: {{ util:getPort(spec, "mqtt").port }}
                initialDelaySeconds: 15
                periodSeconds: 30
                failureThreshold: 240

    to this:

    Code Block
    languageyaml
              readinessProbe:
                httpGet:
                  path: /api/v1/health/readiness
                  port: 8889
                  scheme: HTTP
                initialDelaySeconds: 20
                periodSeconds: 5
              livenessProbe:
                httpGet:
                  path: /api/v1/health/liveness
                  port: 8889
                  scheme: HTTP
                initialDelaySeconds: 20
                periodSeconds: 30
                failureThreshold: 240
  4. Copy the values.yaml file to make updates in it:

    Code Block
    languagebash
    cd ./hivemq-operator
    cp values.yaml ../my-values.yaml
    cd ..
  5. Update the hivemq.cofingOverride in the my-values.yaml. Add the block that enables the Health API and the bind address 0.0.0.0:

    Code Block
    languageyaml
    hivemq:
      configOverride: |
        <hivemq>
            ... 
            ...
            <health-api>
                <enabled>true</enabled>
                <listeners>
                    <http>
                        <port>8889</port>
                        <name>health-api-listener</name>
                        <bind-address>0.0.0.0</bind-address>
                    </http>
                </listeners>
            </health-api>
        </hivemq>

  6. Deploy from the local directory and supply the updated controller template file and updated values.yaml file:

    Code Block
    languagebash
    cd ..
    helm upgrade hivemq --install ./hivemq-operator --namespace=hivemq \
      --values my-values.yaml \
      --set hivemq.controllerTemplate=my-cluster-stateful-set.yaml \
      --set global.rbac.pspEnabled=false

...