garden
garden copied to clipboard
Kubernetes modules fail when manifest kind is List
Bug
Current Behavior
deploying a kubernetes module that uses List kind will throws this error:
Failed getting status for service 'spring-config-watcher' (from module 'spring-config-watcher'). Here is the output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Cannot read property 'namespace' of undefined
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Reproducible example
kind: Project
name: temp
environments:
- name: local
providers:
- name: local-kubernetes
setupIngressController: false
---
kind: Module
type: kubernetes
name: spring-config-watcher
files: [spring-config-watcher.yml]
where the manifest is of kind List:
---
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Service
metadata:
...
The full manifest I was using is here: https://docs.spring.io/spring-cloud-kubernetes/docs/2.0.0-M3/reference/html/#deployment-yaml
Workaround
refactor the List into a multi-document yaml file
(garden 0.12.2)
This issue has been automatically marked as stale because it hasn't had any activity in 60 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
This should be a simple fix—we'd be happy to provide some guidance for a contributor to get started with a PR for this.
This was fixed in #4501. Closing as a duplicate of #4500.