Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Bug: Helm chart fails to install in latest Helm versions due to nil set at adapter Description #68

Open
RafaAguilar opened this issue Oct 15, 2020 · 2 comments · May be fixed by #69
Open

Comments

@RafaAguilar
Copy link

Symptom:

when executing

helm install appidentityandaccessadapter/appidentityandaccessadapter --generate-name

It fails the installation with the following prompt error:

error validating data: unknown object type "nil" in adapter.spec.description

How to reproduce it:

Pre-requisites:

$ helm version
version.BuildInfo{Version:"v3.2.4", GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688", GitTreeState:"clean", GoVersion:"go1.13.12"}

$ kubectl version
istClient Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.5", GitCommit:"e6503f8d8f769ace2f338794c914a96fc335df0f", GitTreeState:"clean", BuildDate:"2020-07-04T15:01:15Z", GoVersion:"go1.14.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.7", GitCommit:"e9496a9e13aa91e0fba8ae9b83ca9d61ee2bde36", GitTreeState:"clean", BuildDate:"2020-09-17T06:35:47Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

$ istioctl version
client version: 1.6.4
control plane version: 1.7.1
data plane version: 1.7.1 (5 proxies)

Steps from this guide:

helm repo add appidentityandaccessadapter https://raw.githubusercontent.com/ibm-cloud-security/app-identity-and-access-adapter/master/helm/appidentityandaccessadapter

helm install --name appidentityandaccessadapter appidentityandaccessadapter/appidentityandaccessadapter

Expected Result:

Installation finishes with success message

@RafaAguilar
Copy link
Author

RCA:

In the file helm/appidentityandaccessadapter/templates/ibmcloudappid.yaml in the line 9 description is set to nil causing the problem when generating the templates.

How get to issue:

  1. Generate templates and split them per resource:
helm install ./helm/appidentityandaccessadapter --generate-name

csplit -f resource_ -z .out /---/ '{*}'
  1. Apply each file independently, when reaching resource with the name The resource with the name resource_06` will fail with the following prompt
$ kubectl apply -f adapter_06

error: error validating "adapter_06": error validating data: unknown object type "nil" in adapter.spec.description; if you choose to ignore these errors, turn validation off with --validate=false
  1. While turning validation off would help, as the message says, the issue can be solved as well changing the description from nil to empty string (""), i.e.:

from:

---
...
apiVersion: "config.istio.io/v1alpha2"
kind: adapter
metadata:
  name: appidentityandaccessadapter
  namespace: istio-system
spec:
  description: 
...

to:


...
apiVersion: "config.istio.io/v1alpha2"
kind: adapter
metadata:
  name: appidentityandaccessadapter
  namespace: istio-system
spec:
  description: ""   # <---- Empty String
...

Solution:

Replace the description in the template helm/appidentityandaccessadapter/templates/ibmcloudappid.yaml from nil to "" to have a clean helm installation.

@RafaAguilar
Copy link
Author

Fixed in PR: #69

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant