garden icon indicating copy to clipboard operation
garden copied to clipboard

Kubernetes modules fail when manifest kind is List

Open padamson-r7 opened this issue 4 years ago • 2 comments

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)

padamson-r7 avatar Aug 20 '20 11:08 padamson-r7

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!

stale[bot] avatar Oct 23 '20 16:10 stale[bot]

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.

thsig avatar May 31 '22 09:05 thsig

This was fixed in #4501. Closing as a duplicate of #4500.

vvagaytsev avatar Jul 04 '23 11:07 vvagaytsev