spotahome / redis-operator

Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Apache License 2.0
1.52k stars 363 forks source link

Helm install of operator fails, CustomResourceDefinition too long #496

Closed jonathon2nd closed 2 years ago

jonathon2nd commented 2 years ago

Expected behaviour

Installation of operator

Actual behaviour

Installation fails

Steps to reproduce the behaviour

Install with monitoring.enabled and monitoring.serviceMonitor enabled

Environment

How are the pieces configured?

Installing with Argo, which just uses helm chart and values.

Logs

CustomResourceDefinition.apiextensions.k8s.io "redisfailovers.databases.spotahome.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

image

alexey-demyanov commented 2 years ago

Confirm. Same if you are trying to kubectl it.

# kubectl apply -f crd.yaml 
The CustomResourceDefinition "redisfailovers.databases.spotahome.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
alexey-demyanov commented 2 years ago

But kubectl create is working.

jonathon2nd commented 2 years ago

Is this something that can be fixed?

sotberd commented 2 years ago

You can use --server-side apply. https://argo-cd.readthedocs.io/en/latest/user-guide/sync-options/#server-side-apply

jonathon2nd commented 2 years ago

That did not work either image image

sotberd commented 2 years ago

ArgoCD version ?

jonathon2nd commented 2 years ago

v2.4.12

jonathon2nd commented 2 years ago

Was able to apply with kubectl.

Since the helm can not upgrade the crd anyway, how about having a value in helm to exclude it (and have that default)? Has to be manually managed anyway.

sotberd commented 2 years ago

If ` syncOptions:

jonathon2nd commented 2 years ago

image That worked.

sotberd commented 2 years ago

Nice 👍

sotberd commented 2 years ago

Confirm. Same if you are trying to kubectl it.

# kubectl apply -f crd.yaml 
The CustomResourceDefinition "redisfailovers.databases.spotahome.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

try with kubectl apply --server-side -f crd.yaml