Skip to content

StartupProbe fails on hardened RabbitMQ images due to missing grep dependency #2168

@coy2k

Description

@coy2k

Describe the bug

The RabbitMQ Cluster Operator startup probe uses grep to validate cluster readiness.
When using hardened/minimal RabbitMQ images that do not include grep, the probe fails and pods do not become healthy.

Error observed:

Warning  Unhealthy  53m  kubelet  Startup probe failed: /bin/bash: line 1: grep: command not found

To Reproduce

Steps to reproduce the behavior:

  1. Deploy RabbitMQ Cluster Operator.
  2. Create a RabbitmqCluster using a hardened RabbitMQ image without grep.
  3. Wait for StatefulSet pods to start.
  4. Check pod events and observe startup probe failure.

Include any YAML or manifest necessary to reproduce the problem.

RabbitmqCluster example:

apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: hardened-rabbitmq
spec:
  replicas: 3
  image: dhi.io/rabbitmq:4.2.6

Expected behavior
Startup probe should not depend on optional shell utilities like grep and should succeed on hardened/minimal images when RabbitMQ is healthy.
Ideally, the probe would use a RabbitMQ API endpoint (HTTP management or dedicated health endpoint) instead of shell command parsing, which would be more robust and image-agnostic.

Screenshots

If applicable, add screenshots to help explain your problem.

Version and environment information

  • RabbitMQ: 4.2.6
  • RabbitMQ Cluster Operator: v2.21.0
  • Kubernetes: v1.35.3
  • Cloud provider or hardware configuration:
    AKS, Linux nodes, hardened RabbitMQ container image

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions