cyclops: TypeError reading 'forEach'
Describe the bug I’m unable to create modules from the Helm chart for Argo Workflows. Trying a popular chart like Argo was a debugging step after seeing the same error from various charts in private repos.
To Reproduce Steps to reproduce the behavior:
- In CyclopsUI, go to ‘Templates’
- Click on ‘Add template reference’
- Enter the following:
Repository URL: https://github.com/argoproj/argo-helm
Path: charts/argo-workflows
- Attempt to create a module from this template. See error.
Expected behavior No errors. Template options displayed for Argo Workflows.
Screenshots Resulting error:
TypeError: Cannot read properties of null (reading 'forEach')
Check if Cyclops backend is available on: http://cyclops-ctrl.cyclops:8080
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Edge
- Version: 129.0.2792.79
- CyclopsUI version: v0.13.1
- Kubernetes distro: K3s installed with Rancher Desktop
Additional Context On the bright side, the new private templates feature works as expected.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 34
One thing I noticed on the install page -
It seems there is a consistent 0.1 difference between docs and latest release version -
Feel free to leave the URL fetch feature, if you think it has value to other users. Although it would help to have a label in the web form saying “Supports public repos URLs only” or similar.
We could do 1 branch per values file… We would need some Github Actions workflows to keep everything in sync. Somewhat risky 😄 We might also handle it via enum values in the schema json. We can think about options here. I wonder if other Cyclops users run into this situation.
Understood about “no values file = empty UI”. We did try that accidentally!
Thanks for looking into Cyclops preserving the defaults from the schema.
It seems we have an unintentional feature 😄 The label
app.kubernetes.io/instancewas missing from many of our Helm chart templates. Some template objects we prefer to keep hidden. Now I can selectively add the label only for objects (like Services) which should be visible to Cyclops users.No need for isolated pod discovery. That was an irrelevant example. Everything we need Cyclops to manage is composed of Deployment / Service / etc.
About missing the standard labels, it looks like our charts need them added. Will try that soon.
Great to know about the TemplateAuthRule regex feature!
Thanks for the feedback. We won’t implement it for now
Still tweaking some things that were queried on cluster scope, and we will get back to you with Cyclops configuration and Roles/Service accounts for single namespace setup ASAP
I think you can leave the Module reconciler running. Deploying a new app is actually useful in either of these namespaces -
WATCH_NAMESPACEorWATCH_NAMESPACE_HELM. Over time, we may migrate legacy Helm releases to deployment via Cyclops. The only concern is cluster-wide permissions, which should be solved soon. We only need to prevent Cyclops from deploying new apps to arbitrary namespaces.@jrbe228, yeah, RBAC is in the works! There is already an open PR for it we are still working on - https://github.com/cyclops-ui/cyclops/pull/361
We added an external IPs section to the service, which gets all the IPs (and hostnames) from
.status.loadBalancer.ingressof the service, along with IPs from.spec.externalIPs.I will create a release candidate version with external IPs and Helm release management, which you can play around with. I will notify you once the rc is built and how to install it.
I would love to hear if it would help your use case and if there is anything else you would like to see included 😄
At the moment, Service external IP is the only critical info to add. Ports are already summarized nicely:
I see Cyclops already has Auth and RBAC on the roadmap. We would benefit from these features in the long term. However the platform is usable without them, assuming we trust our Devs to be responsible 😂
Hey @jrbe228, thanks for raising this!
Cyclops renders UIs based on the helm chart schema in
values.schema.json. You are seeing this issue on argo workflows chart because those charts do not contain the mentioned file.There are tools that will allow you to generate the schema from your helm charts -> https://github.com/dadav/helm-schema Cerbos and Grafana K6 use it, and we find it straightforward and simple to use. It will read your
values.yamland generatevalues.schema.jsonbased on it. You can then push the schema json along with your chart, and you should be able to use your UIs.Let us know if the issue persists after you add the
values.schema.jsonin case we need to dive deeper.Nonetheless, we will update the error message so it is easier to determine the cause of the error.