ServiceAccountName not properly set in juju 2.8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Yang Kelvin Liu |
Bug Description
Hello,
A K8s charm with RBAC is not working in juju 2.8.
How to reproduce:
```
$ sudo snap install juju --classic --channel 2.8/stable
$ sudo snap install microk8s --classic
$ microk8s.status --wait-ready
$ microk8s.enable rbac storage dns
$ juju bootstrap microk8s
$ juju add-model osm
$ juju deploy cs:~charmed-
$ watch -c juju status --color # Wait until it is ready
$ microk8s.kubectl -n osm logs mongodb-k8s-0 -c mongodb-sidecar-k8s
Error in workloop { [Error: [object Object]]
message:
{ kind: 'Status',
apiVersion: 'v1',
metadata: {},
status: 'Failure',
message:
'pods is forbidden: User "system:
reason: 'Forbidden',
details: { kind: 'pods' },
code: 403 },
statusCode: 403 }
$ microk8s.kubectl -n osm get pods mongodb-k8s-0 -o json | jq .spec.serviceAc
"default"
```
Doing the same with juju 2.7, it's working perfectly:
```
$ sudo snap install juju --classic --channel 2.7/stable
$ sudo snap install microk8s --classic
$ microk8s.status --wait-ready
$ microk8s.enable rbac storage dns
$ juju bootstrap microk8s
$ juju add-model osm
$ juju deploy cs:~charmed-
$ watch -c juju status --color # Wait until it is ready
$ microk8s.kubectl -n osm get pods mongodb-k8s-0 -o json | jq .spec.serviceAc
"mongodb-k8s"
```
I noticed that the serviceAccountName is "default" in 2.8, but it is "mongodb-k8s" in 2.7.
Changed in juju: | |
milestone: | none → 2.8-next |
Changed in juju: | |
assignee: | nobody → Yang Kelvin Liu (kelvin.liu) |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | 2.8-next → 2.8.6 |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
This is currently blocking the OSM team on a deployment.