OT-CONTAINER-KIT / helm-charts

A repository which that will contain helm charts with best and security practices.
https://ot-container-kit.github.io/helm-charts
49 stars 84 forks source link

redis-cluster (and maybe other) helm chart values are missing global section #139

Open peter-mueller-viacom opened 1 year ago

peter-mueller-viacom commented 1 year ago

Does this issue reproduce with the latest release? yes

What operating system and processor architecture are you using (kubectl version)?

$ kubectl version Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.4" Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.2-gke.1001"

What did you do? $ helm install redis-cluster ot-helm/redis-cluster -f ~/rediscluster-values.yaml --namespace default --version 0.15.3

What did you expect to see? NAME: redis-cluster LAST DEPLOYED: Thu Sep 21 13:06:00 2023 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None

What did you see instead? Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(RedisCluster.spec): unknown field "nodeSelector" in in.opstreelabs.redis.redis.v1beta1.RedisCluster.spec, ValidationError(RedisCluster.spec): unknown field "tolerations" in in.opstreelabs.redis.redis.v1beta1.RedisCluster.spec]

The example helm chart (https://github.com/OT-CONTAINER-KIT/helm-charts/blob/main/charts/redis-cluster/templates/redis-cluster.yaml) is incorrect. When defining redis-cluster chart, the other values such as nodeSelector and tolerations must be under a global section. For example, it works with below code:

global:

nodeSelector: {}

nodeSelector: foo/nodepool: portworx

tolerations:

Please update the example values chart to help the next user. Many thanks

peter-mueller-viacom commented 1 year ago

In case anyone else runs into this issue