Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller fails on empty manifest files from a Helm Chart #2622

Closed
mphammer opened this issue Mar 4, 2020 · 24 comments · Fixed by #2831
Closed

Controller fails on empty manifest files from a Helm Chart #2622

mphammer opened this issue Mar 4, 2020 · 24 comments · Fixed by #2831
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. language/helm Issue is related to a Helm operator project
Milestone

Comments

@mphammer
Copy link

mphammer commented Mar 4, 2020

Bug Report

What did you do?
For each of the following cases I did these steps:

  1. Created an Operator from a local helm chart:
    $ operator-sdk new my-operator --type=helm --helm-chart <local_helm_chart_path>
  2. Deployed the CRD
    $ kubectl create -f deploy/crds/<resource>_crd.yaml
  3. Started local operator
    $ operator-sdk run --local
  4. Create the CR
    kubectl create -f deploy/crds/<resource>_cr.yaml

Case 1: A file containing a resource is empty due to a conditional

  • myvalue is not set
{{ if .Values.myvalue }}
# entire resource goes here
# ...
{{ end }}

Case 2: There is an empty manifest from --- markers

---

---
# valid resources go here
# ...

What did you expect to see?

  • The controller ignores the empty resources

What did you see instead? Under which circumstances?
Some of the resources were deployed but I saw the following error messages repeatedly printed...
Case 1:

{"level":"error",
"ts":1583340099.203393,
"logger":"helm.controller",
"msg":"Release failed",
"namespace":"default",
"name":"example-product",
"apiVersion":"domain.com/v1alpha1",
"kind":"Product",
"release":"example-product",
"error":"failed to install release: no objects visited",
"stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tpkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngithub.com/operator-framework/operator-sdk/pkg/helm/controller.HelmOperatorReconciler.Reconcile\n\tsrc/github.com/operator-framework/operator-sdk/pkg/helm/controller/reconcile.go:194\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:88"}

Case 2:

{"level":"error",
"ts":1583340147.234184,
"logger":"helm.controller",
"msg":"Failed to run release hook",
"namespace":"default",
"name":"example-product",
"apiVersion":"domain.com/v1alpha1",
"kind":"Product",
"release":"example-product",
"error":"no matches for kind \"\" in version \"\"",
"stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tpkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngithub.com/operator-framework/operator-sdk/pkg/helm/controller.HelmOperatorReconciler.Reconcile\n\tsrc/github.com/operator-framework/operator-sdk/pkg/helm/controller/reconcile.go:308\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:88"}

Environment

  • operator-sdk version:
$ operator-sdk version
operator-sdk version: "v0.15.2", commit: "ffaf278993c8fcb00c6f527c9f20091eb8dd3352", go version: "go1.13.8 darwin/amd64"
  • go version:
$ go version
go version go1.13.8 darwin/amd64
  • Kubernetes version information:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T23:43:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.9-gke.9", GitCommit:"a9973cbb2722793e2ea08d20880633ca61d3e669", GitTreeState:"clean", BuildDate:"2020-02-07T22:35:02Z", GoVersion:"go1.12.12b4", Compiler:"gc", Platform:"linux/amd64"}
  • Are you writing your operator in ansible, helm, or go?
$ helm version
version.BuildInfo{Version:"v3.0.1", GitCommit:"7c22ef9ce89e0ebeb7125ba2ebf7d421f3e82ffa", GitTreeState:"clean", GoVersion:"go1.13.4"}

Possible Solution

  • If a manifest is empty then do not attempt to reconcile it in the cluster

Additional context

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Mar 4, 2020

Hi @mphammer,

Could you please provide and -helm-chart <local_helm_chart_path> which we can use to reproduce your scenario in order to make it more clear? Have you any example from the stable repo which would allow us to check/reproduce it? Also, what do you mean with If a manifest is empty then do not attempt to reconcile it in the cluster? Could you please elaborate more?

@camilamacedo86 camilamacedo86 added language/helm Issue is related to a Helm operator project triage/needs-information Indicates an issue needs more information in order to work on it. labels Mar 4, 2020
@joelanford
Copy link
Member

@mphammer

Case 1 is actually pretty common in Helm charts. In fact, we coincidentally test this case in the SDK's helm-operator e2e test (check out the ingress template generated from this command in the test).

So I'm fairly certain the Helm operator supports disabling entire resources. Your error seems to indicate that the release contained no resources at all. And in that case, it would make sense to fail an installation.

For case 2, this looks like a legitimate bug. My guess is that it is originating from here.

We parse each YAML document in the release manifest and assume that we'll find the object meta. In the case of your chart it looks like there are some empty documents, which parse "successfully", but result in an empty object.

Any chance you would be interested in submitting a PR to add some extra sanity checks in that function to make sure that we have a non-empty GVK?

@joelanford joelanford added kind/bug Categorizes issue or PR as related to a bug. and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Mar 26, 2020
@mphammer
Copy link
Author

mphammer commented Mar 30, 2020

Hi @mphammer,

Could you please provide and -helm-chart <local_helm_chart_path> which we can use to reproduce your scenario in order to make it more clear? Have you any example from the stable repo which would allow us to check/reproduce it? Also, what do you mean with If a manifest is empty then do not attempt to reconcile it in the cluster? Could you please elaborate more?

Hi @camilamacedo86,

Sorry for the late response. These errors were not from the stable repo but from a custom helm chart. Here are examples of the Charts:
Case 1:
Chart.yaml:

apiVersion: v1
name: my-helm-chart
description: A helm chart for me
type: application
version: 1.0.0
appVersion: 2.3.0

Values.yaml:

exposeService: true

templates/service-exposed.yaml (this file will be empty):

{{ if .Values.exposeService }}
apiVersion: v1
kind: Service
metadata:
  labels:
    name: {{ .Release.Name }}-exposed-label
  name: {{ .Release.Name }}-service-exposed
  namespace: {{ .Release.Namespace }}
spec:
  ports:
    - name: port-8443
      port: 8443
      protocol: TCP
      targetPort: 8443
  selector:
    name: {{ .Release.Name }}-exposed-label
  type: LoadBalancer
{{ end }}

templates/service.yaml:

apiVersion: v1
kind: Service
metadata:
  labels:
    name: {{ .Release.Name }}-label
  name: {{ .Release.Name }}-service
  namespace: {{ .Release.Namespace }}
spec:
  ports:
    - name: port-8443
      port: 8443
      protocol: TCP
      targetPort: 8443
  selector:
    name: {{ .Release.Name }}-label
  type: ClusterIP

Case 2:
Chart.yaml:

apiVersion: v1
name: my-helm-chart
description: A helm chart for me
type: application
version: 1.0.0
appVersion: 2.3.0

Values.yaml:

exposeService: true

templates/services.yaml (there will be an empty manifest):

apiVersion: v1
kind: Service
metadata:
  labels:
    name: {{ .Release.Name }}-label
  name: {{ .Release.Name }}-service
  namespace: {{ .Release.Namespace }}
spec:
  ports:
    - name: port-8443
      port: 8443
      protocol: TCP
      targetPort: 8443
  selector:
    name: {{ .Release.Name }}-label
  type: ClusterIP
---
{{ if .Values.exposeService }}
apiVersion: v1
kind: Service
metadata:
  labels:
    name: {{ .Release.Name }}-exposed-label
  name: {{ .Release.Name }}-service-exposed
  namespace: {{ .Release.Namespace }}
spec:
  ports:
    - name: port-8443
      port: 8443
      protocol: TCP
      targetPort: 8443
  selector:
    name: {{ .Release.Name }}-exposed-label
  type: LoadBalancer
{{ end }}
---

And by If a manifest is empty then do not attempt to reconcile it in the cluster I mean that the operator could skip trying to create/update a resource if it reads an empty file (case 1) or if it finds an empty manifest due to two --- delimiters in a row (case 2).

Thanks for taking a look into this! :)

@bharathi-tenneti
Copy link
Contributor

/assign

@mphammer
Copy link
Author

mphammer commented Apr 6, 2020

Hi @joelanford, thanks for the information and the "kind/bug" label. I don't currently have the cycles to work on this issue. Thanks @bharathi-tenneti for taking this up! If you need more information from me I will do my best to assist you.

@bharathi-tenneti
Copy link
Contributor

@mphammer
When trying to reproduce CASE 1, with below environment, I see that operator shows error in the creation step itself, as shown below.

$ operator-sdk new my-operator --type=helm --helm-chart=my-helm-chart/
INFO[0000] Creating new Helm operator 'my-operator'.    
INFO[0000] Created helm-charts/my-helm-chart            
INFO[0000] Generating RBAC rules                        
WARN[0000] Using default RBAC rules: failed to generate RBAC rules: failed to get default manifest: failed to render chart templates: template: my-helm-chart/templates/tests/test-connection.yaml:14:65: executing "my-helm-chart/templates/tests/test-connection.yaml" at <.Values.service.port>: nil pointer evaluating interface {}.port 
INFO[0000] Created build/Dockerfile                     
INFO[0000] Created watches.yaml                         
INFO[0000] Created deploy/service_account.yaml          
INFO[0000] Created deploy/role.yaml                     
INFO[0000] Created deploy/role_binding.yaml             
INFO[0000] Created deploy/operator.yaml                 
INFO[0000] Created deploy/crds/charts.helm.k8s.io_v1alpha1_myhelmchart_cr.yaml 
INFO[0000] Generated CustomResourceDefinition manifests. 
INFO[0000] Project creation complete.                   

Was curious, whether you have seen similar error while creation.
Later, encountered bellow error , after deployment of cr

{"level":"info","ts":1586186301.702219,"logger":"controller-runtime.controller","msg":"Starting Controller","controller":"myhelmchart-controller"}
{"level":"info","ts":1586186301.7022479,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"myhelmchart-controller","worker count":1}
{"level":"error","ts":1586186373.333587,"logger":"helm.controller","msg":"Release failed","namespace":"default","name":"example-myhelmchart","apiVersion":"charts.helm.k8s.io/v1alpha1","kind":"MyHelmChart","release":"example-myhelmchart","error":"failed to install release: template: my-helm-chart/templates/tests/test-connection.yaml:14:65: executing \"my-helm-chart/templates/tests/test-connection.yaml\" at <.Values.service.port>: nil pointer evaluating interface {}.port","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tpkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngithub.com/operator-framework/operator-sdk/pkg/helm/controller.HelmOperatorReconciler.Reconcile\n\tsrc/github.com/operator-framework/operator-sdk/pkg/helm/controller/reconcile.go:196\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:256\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\tpkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:88"}

P.S

operator-sdk version
operator-sdk version: "v0.16.0", commit: "55f1446c5f472e7d8e308dcdf36d0d7fc44fc4fd", go version: "go1.14 darwin/amd64"
helm version
version.BuildInfo{Version:"v3.1.0", GitCommit:"b29d20baf09943e134c2fa5e1e1cab3bf93315fa", GitTreeState:"clean", GoVersion:"go1.13.8"}

@joelanford
Copy link
Member

@mphammer @bharathi-tenneti Just want to re-iterate my previous comment that I think something slightly different is happening with case 1 than what is described in the issue.

The error message you got (failed to install release: no objects visited) is actually coming from the Helm libraries here. That error means that there were 0 resources in the release manifest, so there must be something wrong with your templates or CR values that is causing nothing to be rendered.

I think we can fix case 2 by checking to make sure the GVK is not empty.

@estroz estroz added this to the v0.17.0 milestone Apr 6, 2020
@depohmel
Copy link

depohmel commented Apr 6, 2020

Hello I'm seeing similar issue:

2020-04-06T20:22:04.006Z	ERROR	helm.controller	Failed to run release hook	{"namespace": "k10-operator", "name": "example-k10", "apiVersion": "apik10.kasten.io/v1alpha1", "kind": "K10", "release": "example-k10", "error": "no matches for kind \"\" in version \"\""}
github.com/go-logr/zapr.(*zapLogger).Error
	pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
github.com/operator-framework/operator-sdk/pkg/helm/controller.HelmOperatorReconciler.Reconcile
	src/github.com/operator-framework/operator-sdk/pkg/helm/controller/reconcile.go:256
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:256
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:232
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:211
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
	pkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	pkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
	pkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:88
2020-04-06T20:22:04.006Z	ERROR	controller-runtime.controller	Reconciler error	{"controller": "k10-controller", "request": "k10-operator/example-k10", "error": "no matches for kind \"\" in version \"\""}
github.com/go-logr/zapr.(*zapLogger).Error
	pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:258
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:232
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:211
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
	pkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	pkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
	pkg/mod/k8s.io/apimachinery@v0.0.0-20191004115801-a2eda9f80ab8/pkg/util/wait/wait.go:88

based on logs, operator can not process Deployments.
Our Deployments objects are conditionally generated via 2 layers of tpls :(

Looks like operator does create deployments objects but can not watch them.

and of cause chart can be deployed via helm without any errors.

@jsm84
Copy link

jsm84 commented Apr 6, 2020

@joelanford we have a partner seeking operator certification that is also seeing case 2. In their particular case, the chart installs and also renders fine using helm3. Putting the same chart into an operator yields case 2, which we believe occurs when the deployment templates get rendered.

The following conditional code appears to be tripping up the helm-operator:

{{/* Generates deployment specs for CR controller services. These are stateless. */}}
{{- range include "k10.crServices" . | splitList " " }}
  {{ $service := print "crc-" . }}
  {{ dict "main" $ "k10_service" $service "persistence.enabled" false "replicas" 1 | include "k10-default" }}
{{- end }}

The chart name is k10 and can be installed from the repo at https://charts.kasten.io.

@bharathi-tenneti
Copy link
Contributor

@jsm84 Can you please recheck the charts link from above, will try to reproduce.

@jsm84
Copy link

jsm84 commented Apr 7, 2020

@bharathi-tenneti Sorry about that. That link is a helm repo, and not browser accessible.

The following helm commands will add the repo, and then fetch the chart in tar.gz format:

$ helm repo add kasten https://charts.kasten.io
$ helm fetch kasten/k10

@bharathi-tenneti
Copy link
Contributor

@jsm84 What is your helm version and sdk version?

@depohmel
Copy link

depohmel commented Apr 7, 2020

@jsm84 What is your helm version and sdk version?

helm chart is helm2
sdk is 0.15.2 (0.16.0 requires h3 chart)

this chart works find with helm3 and helm2

@joelanford
Copy link
Member

joelanford commented Apr 8, 2020

0.16.0 requires h3 chart

@depohmel Really? If so, that was an unexpected breakage. Do you have details?

@depohmel
Copy link

depohmel commented Apr 8, 2020

0.16.0 requires h3 chart

@depohmel Really? If so, that was an unexpected breakage. Do you have details?

Unfortunately yes, it looks for Charts.lock with is available only in helm 3 since requirements were moved to Chart.yaml. I can create the issue tomorrow with details.

@depohmel
Copy link

depohmel commented Apr 8, 2020

0.16.0 requires h3 chart

@depohmel Really? If so, that was an unexpected breakage. Do you have details?

@joelanford FIled #2806

@bharathi-tenneti
Copy link
Contributor

bharathi-tenneti commented Apr 8, 2020

@depohmel @mphammer Can you please try this repo for SDK, and let us know if it fixes Case 2 for you?
https://github.com/bharathi-tenneti/operator-sdk/tree/issue%232622

@depohmel
Copy link

depohmel commented Apr 9, 2020

@depohmel @mphammer Can you please try this repo for SDK, and let us know if it fixes Case 2 for you?
https://github.com/bharathi-tenneti/operator-sdk/tree/issue%232622

@bharathi-tenneti i'm getting this error, right after fully rendered chart

2020-04-09T00:28:34.440Z	ERROR	controller-runtime.controller	Reconciler error	{"controller": "k10-controller", "request": "kasten/k10", "error": "Operation cannot be fulfilled on k10s.apik10.kasten.io \"k10\": the object has been modified; please apply your changes to the latest version and try again"}
github.com/go-logr/zapr.(*zapLogger).Error
   /repo/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
   /repo/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.2/pkg/internal/controller/controller.go:258
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
   /repo/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.2/pkg/internal/controller/controller.go:232
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
   /repo/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.2/pkg/internal/controller/controller.go:211
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
   /repo/go/pkg/mod/k8s.io/apimachinery@v0.17.4/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
   /repo/go/pkg/mod/k8s.io/apimachinery@v0.17.4/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
   /repo/go/pkg/mod/k8s.io/apimachinery@v0.17.4/pkg/util/wait/wait.go:88

@depohmel
Copy link

depohmel commented Apr 9, 2020

good news that I can see Deployments in logs now.

@bharathi-tenneti
Copy link
Contributor

bharathi-tenneti commented Apr 9, 2020

@depohmel Great, so did I understand correctly, that your issue is getting fixed when you use SDK repo from this branch?
https://github.com/bharathi-tenneti/operator-sdk/tree/issue%232622
Once you give confirmation, ill submit PR to operator-sdk repo, and this fix will be available in next release.

@depohmel
Copy link

depohmel commented Apr 9, 2020

@depohmel Great, so did I understand correctly, that your issue is getting fixed when you use SDK repo from this branch?
https://github.com/bharathi-tenneti/operator-sdk/tree/issue%232622
Once you give confirmation, ill submit PR to operator-sdk repo, and this fix will be available in next release.

Yes, one of them :) there is still another error :(

@joelanford
Copy link
Member

@depohmel That seems like a completely separate issue. Can you file a separate GitHub issue for that one?

@depohmel
Copy link

depohmel commented Apr 9, 2020

@jsm84
Copy link

jsm84 commented Apr 10, 2020

OK I've found the bug in the chart that @depohmel is using. It's the exact case 2. There was a template file, v0services.yaml inside the chart that had the following lines:

---
{{ end -}}
{{/*aggregatedapis-svc can be exposed via gateway later is required.*/}}
---

I've removed the comment and the latter --- from the file, and the operator no longer throws the error, and it renders/prints the chart to stdout as normal. @joelanford As you mentioned, I think the fix for helm-operator is to ignore input files without a valid GVK. This is definitely an issue with the chart that the standalone helm binary seems to ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. language/helm Issue is related to a Helm operator project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants