gtsystem / lightkube

Modern lightweight kubernetes module for python
https://lightkube.readthedocs.io
MIT License
96 stars 11 forks source link

`codecs.load_all_yaml(...)` doesn't handle objects that are of kind `*List` #50

Closed addyess closed 11 months ago

addyess commented 1 year ago

given a file like this defined by ServiceAccountList

apiVersion: v1
kind: ServiceAccountList
metadata: {}
items:
- apiVersion: v1
  kind: ServiceAccount
  metadata:
    name: test-sa
    namespace: kube-system

can't be handled by codecs.load_all_yaml(...)

I think i could patch something pretty simply to read through the items of the list and they'd be parsed just fine. I'll likely raise a PR for this.

gtsystem commented 11 months ago

Change present in release v0.14.0. Thanks for your contribution!