Skip to content

helm CRD invalid due to templating variables #14

Open
@warmfusion

Description

@warmfusion

(Copied from spotahome#700 (comment) )

Expected behaviour

A redis operator has to be installed successfully.

Actual behaviour

Fails out of the box.

Command
helm install redis-operator redis-operator/redis-operator

fails with the following error:

PS C:\Users\user\Documents\projects\p1\cicd> helm install redis-operator redis-operator/redis-operator
Error: INSTALLATION FAILED: 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

Steps to reproduce the behaviour

Execute helm install redis-operator redis-operator/redis-operator

Environment

EKS cluster platform version eks.7
K8s version - 1.29


Investigations in spotahome#700 shows that the issue relates to the introduction of template variables in the CRD which helm (by design) does not render.

As a consequence, the CRD output is invalid yaml.

The following lines should be removed from the CRD definition;

https://github.com/freshworks/redis-operator/blob/master/charts/redisoperator/crds/databases.spotahome.com_redisfailovers.yaml#L7-L9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions