/srv/irclogs.ubuntu.com/2020/08/21/#smooth-operator.txt

facubatista¡Muy buenos días a todos!11:07
bthomasMorning facubatista11:17
facubatistahola bthomas11:18
bthomasLooks like there is no easy way to debug charms on microk8s. juju debug-log does not show logging messages from the charm because even the smallest update interval of 1min is to slow to capture the logs. Any of the other means debug-hooks, debug-code etc are not supported on k8s.11:19
bthomasfacubatista: if you have some time for a 1:1 anytime I will be much obliged.11:20
facubatistabthomas, in ~10' it's fine11:21
bthomasfacubatista: awesome thank you ping me when you are ready11:22
* facubatista could use a review on this dead simple branch https://github.com/canonical/charmcraft/pull/13311:33
mupPR charmcraft#133: Added a note in the release howto about sending a mail when done <Created by facundobatista> <https://github.com/canonical/charmcraft/pull/133>11:33
* bthomas looking at https://github.com/canonical/charmcraft/pull/13311:34
facubatistabthomas, anytime now, I'm in https://meet.google.com/fqw-mdqc-dsf11:36
bthomasfacubatista: going now11:36
facubatistabthomas, join #juju11:59
moon127hey all, I've added charmcrafters as a reviewer on the MP for unifi-poller charm being written in IS - https://code.launchpad.net/~moon127/charm-k8s-unifi-poller/+git/charm-k8s-unifi-poller/+merge/38964312:55
facubatistamoon127, ack, thanks13:10
justinclarkbthomas, I'm not sure about microk8s, but I can do juju ssh into units in a charmed-kubernetes bundle (the machines are LXD). Could you maybe juju deploy kubernetes-core and then deploy charms to that bundle?13:22
justinclarkNot sure if that'll work, but just offering suggestions.13:23
facubatistaanother easy small PR for review, thanks! https://github.com/canonical/charmcraft/pull/13413:28
mupPR charmcraft#134: Use original permissions when creating a dir at building time <Created by facundobatista> <https://github.com/canonical/charmcraft/pull/134>13:28
justinclarkI'll take a look now facubatista13:41
facubatistathanks13:42
justinclarkI have a (potentially noob) question: When looking at the docs, I see that leader units can set application data [1], but the only way I've found to set application data is through a relation. So my question: is there a way to access the application data directly rather than through a relation?14:02
justinclark[1] https://ops.readthedocs.io/en/latest/index.html#ops.model.RelationData14:02
bthomasjustinclark: thank. Will look into charmed kubernetes14:03
justinclarkbthomas: just a heads up - it's pretty resource intensive. You might have better luck with kubernetes-core bundle.14:03
bthomasgot it14:03
justinclarkContext for my question: when a relation_changed hook fires, I want to save some data that comes through that relation (host and port) to the main application's data.14:06
justinclarkI currently have a silly looking line like this: event.relation.data[self.app]['data-sources'][event.relation.id] = {...}14:08
justinclarkI think it would be much nicer to access app data directly but I don't know if that even makes sense in the context of Juju / operator framework.14:10
bthomasI am looking at those docs myself and can see "They are allowed to read remote unit and application data." But it does not elaborate.14:10
bthomas"They" reffers to units.14:10
facubatistajustinclark, what happens if you do ...14:28
facubatistarelation_data = event.relation.data[self.unit]14:28
facubatistarelation_data[somekey] = somevalue14:28
facubatista?14:28
justinclarkYeah that would clean things up. Let me try something like that.14:28
justinclarkfacubatista, Is there a rule of thumb for what kind of data should be stored at the unit level vs. application level?14:30
justinclark(Again, probably showing my newness to charming)14:30
facubatistaIIUC you set the information to the application at the other end of the relation14:32
facubatistanot the unit14:33
facubatistathat `[self.unit]` I'm doing above is because you have the data for the apps in both units14:33
justinclarkSo if my Grafana charm accepts a Prometheus relation, setting event.relation.data[self.app] would set prometheus app data rather than Grafana app data?14:39
justinclarkOkay, so I think what I actually need is to store the data in the charm's StoredState: https://ops.readthedocs.io/en/latest/index.html#ops.framework.StoredState14:43
justinclarkBasically, I'm just trying to make Grafana data source information (host/port/etc.) easily accessible.14:43
facubatistajustinclark, yes, you can store stuff in the charm's StoredState (btw, you should call that "store", not "state", as we want to get away of tha misnaming: it's a general store, not the "state of the charm")15:27
facubatistaanother easy PR: https://github.com/canonical/charmcraft/pull/13515:31
mupPR charmcraft#135: Support the global options also after the command is given <Created by facundobatista> <https://github.com/canonical/charmcraft/pull/135>15:31
facubatistamthaddon, just took a look at the charm-k8s-gunicorn MP, added some comments17:08
crodriguez__Does anyone know if it is possible to define the metadata in pod_spec_set for a role ? I want to turn this into a pod_spec, and the metadata field is not recognized with the way I do it https://pastebin.canonical.com/p/zQSXfQGnkq/17:45
crodriguez__I get this https://pastebin.canonical.com/p/RYXNzDW6z6/17:49
mupIssue operator#390 opened: Only one role allowed <Created by camille-rodriguez> <https://github.com/canonical/operator/issues/390>17:59
crodriguez__I opened that bug in case you can do something about it in the framework itself. Idk if it is more juju than ops though18:02
* facubatista eods21:28
facubatistaand eows21:28
facubatistasee you all on Monday21:28

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!