Closed tlb1galaxy closed 1 year ago
Can validate chart v3.2.3 works ok.
Opened issue with rabbitmq-operator but they said it is a chart issue and not an operator issue. https://github.com/rabbitmq/cluster-operator/issues/1280
Hi,
Could you explain the issue that this is causing? It has to do with the character limit but the ValidatingWebhookConfiguration should point to the proper service name.
When I deploy via the above manifest, I receive the following error:
Error from server (InternalError): error when creating "95-secret-user-permission.yaml": Internal error occurred: failed calling webhook "vuser.kb.io": failed to call webhook: Post "https://rabbitmq-cluster-rabbitmq-messaging-topology-operator-webhook.compass-staging.svc:443/validate-rabbitmq-com-v1beta1-user?timeout=10s": service "rabbitmq-cluster-rabbitmq-messaging-topology-operator-webhook" not found
Error from server (InternalError): error when creating "95-secret-user-permission.yaml": Internal error occurred: failed calling webhook "vpermission.kb.io": failed to call webhook: Post "https://rabbitmq-cluster-rabbitmq-messaging-topology-operator-webhook.compass-staging.svc:443/validate-rabbitmq-com-v1beta1-permission?timeout=10s": service "rabbitmq-cluster-rabbitmq-messaging-topology-operator-webhook" not found
Forgot to mention.
Whenever you try to deploy a RabbitMQ object within the non-global namespace, you receive the above error message.
---
apiVersion: v1
kind: Secret
metadata:
name: svc-rabbitmq-ra
namespace: compass-staging
labels:
app.kubernetes.io/name: secret
app.kubernetes.io/instance: compass-staging
app.kubernetes.io/version: "3.2.4"
app.kubernetes.io/component: security
app.kubernetes.io/part-of: rabbitmq-cluster
app.kubernetes.io/managed-by: manifests
lastupdate: "202303031104" # yyyymmddhhmm - Should match 'User' labels
type: Opaque
stringData:
username: "user1"
password: "XXXXXXXX"
...
---
apiVersion: rabbitmq.com/v1beta1
kind: User
metadata:
name: user1
namespace: compass-staging
labels:
app.kubernetes.io/name: user
app.kubernetes.io/instance: compass-staging
app.kubernetes.io/version: "3.2.4"
app.kubernetes.io/component: permissions
app.kubernetes.io/part-of: rabbitmq-cluster
app.kubernetes.io/managed-by: manifests
lastupdate: "202303031104" # yyyymmddhhmm - update field for any changes to secret are populated to RabbitMQ
spec:
tags:
- administrator
rabbitmqClusterReference:
name: rabbitmq-cluster
importCredentialsSecret:
name: user1
...
---
apiVersion: rabbitmq.com/v1beta1
kind: Permission
metadata:
name: user1
namespace: compass-staging
labels:
app.kubernetes.io/name: permission
app.kubernetes.io/instance: compass-staging
app.kubernetes.io/version: "3.2.4"
app.kubernetes.io/component: permissions
app.kubernetes.io/part-of: rabbitmq-cluster
app.kubernetes.io/managed-by: manifests
lastupdate: "202303031104" # yyyymmddhhmm - update field for any changes to secret are populated to RabbitMQ
spec:
vhost: "/"
user: "user1" # name corresponds to the username we provided in secret
permissions:
write: ".*"
configure: ".*"
read: ".*"
rabbitmqClusterReference:
name: rabbitmq-cluster
...
Hi @tlb1galaxy, I tried to reproduce your issue but I didn't have luck.
I assume that you are facing the issue when you are trying to apply
the file 95-secret-user-permission.yaml
, so in that case the error you are watching is triggered by the admission controller. Have you checked the ValidatingWebhookConfiguration
objects in your k8s cluster? Do you have several validation webhooks for rabbitmq objects? Do you have other rabbitmq operator installed in the compass-staging
namespace?
@fmulero
When I looked at the ValidatingWebhookConfiguration
there is only one associated with RabbitMQ. I only have the one RabbitMQ operator installed.
When I installed v3.2.3, I literally 'helm delete' and installed same manifest.
.
I will try another cluster which has never had this helm installed and try there.
Tried it on a different cluster. Can't duplicate the error now either. I guess this can be closed as an anomaly. Thanks
Ok, thanks @tlb1galaxy for let us know
https://github.com/bitnami/charts/issues/15324#issuecomment-1467727828 helps us address the same problem. It turns out we installed the operator before, but failed to fully clean up all the resources like ValidatingWebhookConfiguration
. And when we install the new one under a different namespace, we got the same error webhook service not found. After deleting the old ValidatingWebhookConfiguration, we can install the new one. Leaving this here for future readers.
For anybody still having a struggle, we don't have cert manager, I've checked the ca.crt
on the rabbitmq-messaging-topology-operator-webhook
secret, it expired, just delete the secret, and install one patch version up or down, essentially "reinstall" the secret, it will come with new cert. Didn't go into generating new cert and manually changing it, that is the option as well, tho you would need to update the ValidatingWebhookConfiguration
as well I assume.
Name and Version
bitnami/rabbitmq-cluster-operator 3.2.4
What architecture are you using?
amd64
What steps will reproduce the bug?
bitnami_rabbitmq-operator-override-values-v3.2.4.yaml
50-rabbitmq-cluster.yaml
Are you using any custom parameters or values?
No response
What is the expected behavior?
So seems chart v3.2.4 creates a service named
rabbitmq-cluster-rabbitmq-messaging-topology-operator
and notrabbitmq-cluster-rabbitmq-messaging-topology-operator-webhook
What do you see instead?
chart v3.2.4 creates a service named
rabbitmq-cluster-rabbitmq-messaging-topology-operator
Additional information
No response