sidecar charms don't record the cloud service info in the juju model

Bug #1930649 reported by Ian Booth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth

Bug Description

A k8s charm deployment will create a service resource to front the workload pods.

That service resource has an IP address which we record in the juju model as a "cloudService" record for the application. Except for sidecar charms we don't do that so things like the application IP address in status is missing.

works:
juju deploy cs:~juju/mariadb-k8s

doesn't work:
juju deploy snappass-test

Ian Booth (wallyworld)
Changed in juju:
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Revision history for this message
Ian Booth (wallyworld) wrote :
tags: added: sidecar-charm
Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Leon (sed-i) wrote :

I see some entries were automatically added to the peer data bag:

self.model.get_relation("replicas").data.keys() =
KeysView({
  <ops.model.Unit alertmanager-k8s/0>: {
    'egress-subnets': '10.152.183.222/32',
    'ingress-address': '10.152.183.222',
    'private-address': '10.152.183.222',
    'private_address': '10.1.157.125'}, # added by me
  <ops.model.Application alertmanager-k8s>: {}
})

Note the difference between:
1. 'private-address': '10.152.183.222' - auto populated - application address
2. 'private_address': '10.1.157.125' - populated manually by me - unit address

**Shouldn't the auto-populated `private-address` be the unit address instead of the app address?**

Model Controller Cloud/Region Version SLA Timestamp
dev-model my-ctrlr microk8s/localhost 2.9.5 unsupported 11:09:18-04:00

App Version Status Scale Charm Store Channel Rev OS Address Message
alertmanager-k8s active 1 alertmanager-k8s local 0 kubernetes 10.152.183.222

Unit Workload Agent Address Ports Message
alertmanager-k8s/0* active idle 10.1.157.125

Relation provider Requirer Interface Type Message
alertmanager-k8s:replicas alertmanager-k8s:replicas alertmanager-replica peer

Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.