Versions Compared

Key

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

...

\uD83D\uDCD8 Instructions

  1. Clone the repo with hivemq-operator charts locallyGet a local copy of the Helm chart.
    This will create a local copy of the charts saved to the helm-charts subdirectory.download the chart of the version $CHART_VERSION and untar it to the subdirectory hivemq-operator:

    Code Block
    languagebash
    githelm clonepull https://github.com/hivemq/helm-charts.git
    Code Block
    languagebash
    tree -L 1
     .
     └── helm-charts
    Update dependencies
    hivemq/hivemq-operator --version $CHART_VERSION --untar

    ☝️Hint: To download the latest chart version, omit the option --version $CHART_VERSION. To learn more about chart versions refer to the article HiveMQ Kubernetes Operator Helm chart versions.

  2. Update dependencies in the chart’s directory.
    This command verifies that the required charts, as expressed in 'Chart.yaml', are present in 'charts/' and are at an acceptable version. It will pull down the latest charts that satisfy the dependencies, and clean up old dependencies.

    Code Block
    languagebash
    helm dependencies update helm-charts/charts/hivemq-operator update hivemq-operator
    Code Block
    languagetext
    Hang tight while we grab the latest from your chart repositories...
    ...Successfully got an update from the "hivemq" chart repository
    ...Successfully got an update from the "prometheus-community" chart repository
    Update Complete. ⎈Happy Helming!⎈
    Saving 1 charts
    Downloading kube-prometheus-stack from repo https://prometheus-community.github.io/helm-charts
    Deleting outdated charts
  3. Edit operator templates, and update the livenessProbe’s declaration.

    1. Edit the operator templates:

      1. helm-charts/charts/hivemq-operator/operator-tmpls/cluster-daemon-set.yamlhelm-charts/

      2. charts/hivemq-operator/operator-tmpls/cluster-deployment.yaml

      3. helm-charts/charts/hivemq-operator/operator-tmpls/cluster-stateful-set.yaml

    2. Find the existing declaration of the livenessProbe:

      Code Block
      languageyaml
      livenessProbe:
        tcpSocket:
          port: {{ util:getPort(spec, "mqtt").port }}
        initialDelaySeconds: 15
        periodSeconds: 30
        failureThreshold: 240
    3. Replace with the new declaration of the livenessProbe:

      Code Block
      languageyaml
      livenessProbe:
        httpGet:
          path: /heartbeat
          port: {{ util:getPort(spec, "heartbeat").port }}
        initialDelaySeconds: 30
        periodSeconds: 15
        failureThreshold: 240
  4. Get the values.yaml file for the hivemq-operator of the version $CHART_VERSION:

    Code Block
    languagebash
    helm show values hivemq/hivemq-operator --version $CHART_VERSION > my-values.yaml

    ☝️ Hint: To download from the latest chart version, omit the option --version $CHART_VERSION. To learn more about chart versions refer to the article HiveMQ Kubernetes Operator Helm chart versions.

  5. Edit the my-values.yaml file:

    1. Add the heartbeat extension to the end of the hivemq.extensions array:

      Code Block
      languageyaml
      hivemq:
        ...
        extensions:
          ...
          ...    
          - name: hivemq-heartbeat-extension
            extensionUri: https://github.com/hivemq/hivemq-heartbeat-extension/releases/download/1.0.4/hivemq-heartbeat-extension-1.0.4.zip
            enabled: true
    2. Add the heartbeat port to the end of the hivemq.ports array:

      Code Block
      languageyaml
      hivemq:
        ...
        ports:
          ...
          ...
          - name: "heartbeat"
            port: 9090
            expose: true
      
  6. Using Helm, install hivemq-operator from the local directory hivemq-operator which is containing updated operator templates, and use the updated my-values.yaml:

    Code Block
    languagebash
    helm upgrade my-hivemq \ 
      --install helm-charts/charts/hivemq-operator \ 
      --values my-values.yaml 

  7. When the hivemq-operator and hivemq pods are ready, monitor the event.log:

    Code Block
    languagebash
    kubectl exec pod/my-hivemq-abcdefgh -- tail -f log/event.log

...

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@957
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel = "kb-how-to-article" in ( "heartbeat" , "liveness" , "livenessprobe" ) and type = "page" and space = "KB"
labelskb-how-to-article