Skip to content

feat: add VerneMQ 2.x support and restore vmq_k8s Kubernetes plugin#54

Open
fcraviolatti wants to merge 3 commits intovernemq:masterfrom
fcraviolatti:upstream/feat-vernemq2-vmqk8s
Open

feat: add VerneMQ 2.x support and restore vmq_k8s Kubernetes plugin#54
fcraviolatti wants to merge 3 commits intovernemq:masterfrom
fcraviolatti:upstream/feat-vernemq2-vmqk8s

Conversation

@fcraviolatti
Copy link
Copy Markdown

Summary

  • Allow VerneMQ major version 2 in the StatefulSet version check (previously only v1.x was accepted)
  • Update defaultVerneMQVersion to 2.1.2-alpine
  • Restore the vmq_k8s Erlang plugin that was removed in a previous refactor

vmq_k8s plugin

The vmq_k8s plugin handles cluster join/leave by querying the Kubernetes API, which is essential for VerneMQ to form and maintain a cluster in Kubernetes. Without it, nodes cannot discover each other via pod listing.

Changes vs the original plugin:

  • Migrated from lager (deprecated) to OTP logger (built-in since OTP 21)
  • Fixed a missing comma bug in the cluster leave command args
  • Updated rebar.config to use yamerl without lager
  • Erlang sources placed at repo root (src/) for rebar3 compatibility

Test plan

  • Deploy VerneMQ 2.1.2-alpine using the operator and verify the StatefulSet starts correctly
  • Verify vmq_k8s plugin is loaded and cluster membership works across pod restarts
  • Verify no regressions on VerneMQ 1.x deployments

🤖 Generated with Claude Code

- Allow major version 2 in statefulset version check
- Update defaultVerneMQVersion to 2.1.2-alpine
   - Recover erlang/src/ files from old commit 44adcef (plugin was removed)
   - Migrate lager -> OTP logger throughout vmq_k8s_reloader.erl
   - Fix missing comma bug in cluster leave command args
   - Add rebar.config with yamerl dep (no lager)
   - Update bundler rebar dep to reference this fork instead of upstream
   - Update Dockerfile: golang:1.18 -> golang:1.23
   - Add Dockerfile.prebuilt for pre-built binary workflow
…ream reference

   - Move Erlang sources from erlang/src/ to src/ at repo root for rebar3
     compatibility (rebar3 fetches deps from root by default)
   - Move rebar.config to repo root accordingly
   - Update vmq_k8s dep reference to vernemq/vmq-operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant