spotahome / redis-operator

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

Operator Helm Chart v3.3.0 fails at 1st launch #654

Closed paretl closed 5 months ago

paretl commented 10 months ago

Expected behaviour

Launch the Operator Helm chart v3.3.0 (latest one today)

Actual behaviour

It fails fast and the error is:

STDERR:
Error: failed to install CRD crds/databases.spotahome.com_redisfailovers.yaml: error parsing : error converting YAML to JSON: yaml: line 4: did not find expected node content

When digging a little bit, I saw that the crds/databases.spotahome.com_redisfailovers.yaml file has these lines:

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    {{- with .Values.crds.annotations }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
    controller-gen.kubebuilder.io/version: (devel)
  creationTimestamp: null
  name: redisfailovers.databases.spotahome.com

So I guess that the go template part in annotations is not expected here

Steps to reproduce the behavior

:warning: Be sure that you have no current RedisFailover CRD installed. Otherwise, there is no failure. I usually remove the entire release to be sure that everything is removed.

To reproduce, launch the redis-operator chart with v3.3.0.

Environment

How are the pieces configured?

Logs

There is no more details about this error in the logs with the --debug flag.

paretl commented 10 months ago

Ok I saw that the change is already included in the PR https://github.com/spotahome/redis-operator/pull/651

I have created a sub-PR with only this fix to be able to use the latest version of the chart without waiting the approval/test of the other changes: https://github.com/spotahome/redis-operator/pull/655

zeddit commented 10 months ago

I am facing the same issue, should I wait for the upstream helm chart to be updated. thanks

ebuildy commented 10 months ago

we need such annotations for argocd, I have opened https://github.com/spotahome/redis-operator/pull/656 to harcode it

haliliceylan commented 9 months ago

In argocd, I am not able to use this chart. When the planning release time ?

ebuildy commented 9 months ago

there is a PR to fix it https://github.com/spotahome/redis-operator/pull/656 - waiting for some approvals

xolott commented 9 months ago

Same error, trying to deploy the operator into an AKS cluster.

Avnshrai commented 9 months ago

same error, when it is going to get fixed? I am not able to try it for my use case because of this issue

zeddit commented 8 months ago

hi, any progress on this. I am looking forward to the feature of exposing redis master IP directly. great thanks.

sylvainOL commented 8 months ago

Hello, any news?

Avnshrai commented 8 months ago

don't know what is taking too long to merge a PR, I can see just by removing those annotations operator is working fine, and in values.yaml there is a wrong image tag, need to provide v1.3.0-rc instead of v1.3.0 as I can see there is no image with v1.3.0

Screenshot 2023-10-27 at 12 15 59 PM
lenaxia commented 7 months ago

For anyone interested, I got 3.3.0 to install using this method:

  1. Download a local copy of the CRDs to your HelmRelease as crds.yaml
  2. Fix the annotation in the crds.yaml
  3. Disable CRD installation in your HR by setting spec.values.crds.enabled: false
  4. install the CRDs via kustomize, by adding crds.yaml to your kustomization.yaml file
github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 45 days with no activity.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

pando85 commented 5 months ago

Re open it, please.