caktus / ansible-role-django-k8s

Ansible role with sane defaults to deploy a Django app to Kubernetes.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Unable to use role without RabbitMQ Cluster Operator #47

Closed copelco closed 2 years ago

copelco commented 2 years ago

RabbitMQ support added in #46 introduced the use of a RabbitMQ Cluster Operator but inadvertently made the operator required and breaks deployments that don't use RabbitMQ.

Related to:

tobiasmcnulty commented 2 years ago

Perhaps we should simply remove the RabbitMQ cluster? It's easy enough to manage directly from a project, and maybe projects that need it will want to customize it further anyways (the config, for example).

It looks like it's broken with RBAC enabled, too:

failed: [snip] (item={'name': 'rabbitmq.yaml.j2', 'state': 'present'}) => {"ansible_loop_var": "item", "changed": false, "error": 403, "item": {"name": "rabbitmq.yaml.j2", "state": "present"}, "msg": "Failed to retrieve requested object: b'{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"rabbitmqclusters.rabbitmq.com \\\\\"rabbitmq\\\\\" is forbidden: User \\\\\"system:serviceaccount:<snip>:deploy-account\\\\\" cannot get resource \\\\\"rabbitmqclusters\\\\\" in API group \\\\\"rabbitmq.com\\\\\" in the namespace \\\\\"vr-<snip>\\\\\"\",\"reason\":\"Forbidden\",\"details\":{\"name\":\"rabbitmq\",\"group\":\"rabbitmq.com\",\"kind\":\"rabbitmqclusters\"},\"code\":403}\\n'", "reason": "Forbidden", "status": 403}