FIWARE / helm-charts

:globe_with_meridians: Kubernetes HELM Charts for FIWARE Generic Enablers for provisioning scalable, production-ready powered-by-FIWARE installations based around NGSI Context Brokers and other components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in installation of Orion broker helm chart

KeshavSoni2511 opened this issue · comments

I am trying to deploy orion broker through helm and I am facing this issue :-

Error: INSTALLATION FAILED: template: orion/templates/test/orion-test.yaml:1:14: executing "orion/templates/test/orion-test.yaml" at <.Values.test.enabled>: nil pointer evaluating interface {}.enabled

The command which I am using to install it is :-
sudo helm repo add fiware https://fiware.github.io/helm-charts
sudo helm install fiware/orion --generate-name

I wasn't facing this issue earlier.
Can you please help me to resolve it?

Thanks & Regards,
Keshav

Hi Keshav,

I just faced the same issue as you. This occurs because the .Values tree is populated based on the input provided through values.yaml, --values, --set, etc. It is not populated based on how the templates consume the input. If a value is not set, .Values has no knowledge of this sub-tree, and therefore it is evaluated as a nil object when rendered through text/template.

As you can see if you look into orion/templates/test/orion-test.yaml, there is a value which is not found on orion/values.yaml, the one triggering your error: <.Values.test.enabled>. To solve this the maintainer should add the value into the chart, until that happens the workaround is to deploy orion broker with the helm sources locally, adding the value manually.

  1. Clone this repository, edit the file orion/values.yaml and add this at the end of the file (you can change it to false):
test:
  enabled: true
  1. Install the helm chart (from helm-charts/charts):
helm install orion-chart orion/ --values orion/values.yaml
  1. After this the orion broker should be deployed and running:
NAME                                     READY   STATUS    RESTARTS   AGE
pod/orion-chart-9f9c6b8f6-x6hz8          1/1     Running   0          2m22s
pod/orion-chart-mongo-5d46588547-wnz5q   1/1     Running   0          2m22s

NAME                        TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)     AGE
service/kubernetes          ClusterIP   10.96.0.1       <none>        443/TCP     11m
service/orion-chart         ClusterIP   10.99.67.101    <none>        1026/TCP    2m22s
service/orion-chart-mongo   ClusterIP   10.100.71.166   <none>        27017/TCP   2m22s

NAME                                READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/orion-chart         1/1     1            1           2m22s
deployment.apps/orion-chart-mongo   1/1     1            1           2m22s

NAME                                           DESIRED   CURRENT   READY   AGE
replicaset.apps/orion-chart-9f9c6b8f6          1         1         1       2m22s
replicaset.apps/orion-chart-mongo-5d46588547   1         1         1       2m22s

Hello,
sorry, I forgot to set the default-value. Its fixed in the new 1.0.10 chart. Thanks @lopdan for pointing out a solution.
Best