Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passing k8s_resources to pod.set_spec() requires a dict with a single key "kubernetesResources" #387

Closed
axinojolais opened this issue Aug 20, 2020 · 4 comments

Comments

@axinojolais
Copy link

Hi,

If I understand things correctly, one needs to do the following to use pod.set_spec() :

myspec = <whatever>
myresources = <resources>

self.model.pod.set_spec(myspec, k8s_resources={'kubernetesResources': myresources})

Is there any reason we can't call it like this ?

self.model.pod.set_spec(myspec, k8s_resources=myresources)

And then the framework would add embed the resources in a dict under the kubernetesResources key ? Can this dict have any other item ?

Thanks

@stub42
Copy link
Contributor

stub42 commented Aug 25, 2020

If we want to fix this, now is the time since we haven't released a version where the second argument to set_spec actually works, but it will start working when Juju 2.8.2 is released RSN.

@axinojolais
Copy link
Author

If we want to fix this, now is the time since we haven't released a version where the second argument to set_spec actually works, but it will start working when Juju 2.8.2 is released RSN.

Perhaps the code could check the existence of a kubernetesResources key is the given dict, and if it's there mimic the current behaviour ?

@jameinel
Copy link
Member

jameinel commented Aug 25, 2020 via email

@jnsgruk
Copy link
Member

jnsgruk commented Oct 12, 2021

I'm going to close this for now; the pod_spec style of charms are not receiving as much attention any more in favour of "sidecar charms".

@jnsgruk jnsgruk closed this as completed Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants