Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After setting username and password for rabbitmq Cluster secret values are still random #1620

Closed
piotrlaczykowski opened this issue Apr 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@piotrlaczykowski
Copy link

Name and Version

rabbitmq-cluster-operator:4.2.4

What architecture are you using?

amd64

What steps will reproduce the bug?

set additional config for RabbitMQ Cluster to your password and username

 additionalConfig: |
      default_user=${rabbitmqUsername}
      default_pass=${rabbitmqPassword}

Are you using any custom parameters or values?

apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: rabbitmq
spec:
  replicas: ${rabbitmqReplicas}
  tls:
    secretName: rabbitmq-tls
  service:
    type: ClusterIP
  persistence:
    storageClassName: rook-ceph-block
    storage: 5Gi
  rabbitmq:
    additionalPlugins:
      - rabbitmq_shovel
      - rabbitmq_shovel_management
      - rabbitmq_management
      - rabbitmq_peer_discovery_k8s
      - rabbitmq_prometheus
      - prometheus_rabbitmq_exporter
      - prometheus_process_collector
      - rabbitmq_delayed_message_exchange
    additionalConfig: |
      cluster_partition_handling = pause_minority
      vm_memory_high_watermark_paging_ratio = ${rabbitmqVmMemoryHighWatermarkPagingRatio}
      disk_free_limit.absolute = ${rabbitmqDiskFreeLimitAbsolute}
      collect_statistics_interval = ${rabbitmqCollectStatisticInterval}
      vm_memory_high_watermark.absolute = ${rabbitmqVmMemoryHighWatermarkAbsolute}
      default_user=${rabbitmqUsername}
      default_pass=${rabbitmqPassword}
  resources:
    requests:
      cpu: ${rabbitmqCpuRequest}
      memory: ${rabbitmqMemoryRequest}
    limits:
      cpu: ${rabbitmqCpuLimit}
      memory: ${rabbitmqMemoryLimit}
  affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: app.kubernetes.io/name
            operator: In
            values:
            - rabbitmq
        topologyKey: "kubernetes.io/hostname"
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: rabbitmq-cert
spec:
  commonName: ${rabbitmqUrl}
  dnsNames:
    - ${rabbitmqUrl}
    - "*.rabbitmq-nodes.${deployNamespace}.svc.${clusterDomain}"
    - "rabbitmq-nodes.${deployNamespace}.svc.${clusterDomain}"
    - rabbitmq-nodes.${deployNamespace}
    - "*.rabbitmq-nodes.${deployNamespace}"
  issuerRef:
    kind: ClusterIssuer
    name: ca-issuer
  secretName: rabbitmq-tls

What is the expected behavior?

Username and password should be set correctly in $(INSTANCE)-default-user secret for rabbitmq

What do you see instead?

I see a randomly generated user and password for RabbitMQ.

Additional information

The username and password bypassed by additionalConfig are working. These in secret aren't

@piotrlaczykowski piotrlaczykowski added the bug Something isn't working label Apr 22, 2024
@lukebakken
Copy link
Contributor

Hello, thanks for using RabbitMQ.

#1620 is a duplicate of #1018, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants