juju doesn't accept it's own generated cloud.yaml for update-cloud
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
I can't figure a way to do show-cloud, then modify a part of it, and update-cloud because juju doesn't like the file it generates for me:
$ juju show-cloud microk8s-local --controller localhost-localhost --output cloud.yaml --format yaml
$ cat cloud.yaml
name: microk8s-local
summary: Cloud "microk8s-local" from controller "localhost-
defined: public
type: k8s
auth-types: [certificate, clientcertificate, oauth2, oauth2withcert, userpass]
endpoint: https:/
regions:
localhost: {}
users:
admin:
display-name: admin
access: admin
$ juju update-cloud microk8s-local --controller localhost-localhost -f cloud.yaml
ERROR could not read cloud definition from provided file: Invalid cloud metadata map[auth-
Going with json doesn't seem to work as well:
$ juju show-cloud microk8s-local --controller localhost-localhost --output cloud.json --format json
$ cat cloud.json
[{"name"
$ juju update-cloud microk8s-local --controller localhost-localhost -f cloud.json
ERROR could not read cloud definition from provided file: cannot unmarshal yaml cloud metadata: yaml: unmarshal errors:
line 1: cannot unmarshal !!seq into map[string]
Expected result:
Files generated with show-cloud --output (either yaml or json) are accepted back with update-cloud without any modifications of the file.
$ juju --version
3.3.1-genericli
Juju controller running on LXD and cloud is microk8s.
env is on public cloud vm, available to access if needed to troubleshoot.
trying to adjust the file manually to what i assume it expects, but no luck yet, sometimes getting a different error.
Might be a separate issue, or same as the line seems to be the same
$ juju clouds --controller localhost-localhost
Clouds available on the controller:
Cloud Regions Default Type
localhost 1 localhost lxd
microk8s-local 1 localhost k8s
ubuntu@ ip-172- 31-82-122: ~$ cat cloud-fixed.yaml /172.31. 86.143: 16443
clouds:
microk8s-local:
type: k8s
auth-types: [certificate, clientcertificate, oauth2, oauth2withcert, userpass]
endpoint: https:/
regions:
localhost: {}
$ juju update-cloud microk8s-local --controller localhost-localhost -f cloud-fixed.yaml com/juju/ juju/cmd/ juju/cloud. (*CloudFileRead er).ReadCloudFr omFile: 747: com/juju/ juju/cmd/ juju/cloud. (*updateCloudCo mmand). Run:138: could not read cloud definition from provided file
ERROR could not read cloud definition from provided file: no registered provider for "k8s"
no registered provider for "k8s"
github.
github.