Inconsistency between `juju bootstrap` and `juju deploy` when dealing with Kubernetes configuration flags

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

Bug Description

The `juju boostrap` and `juju deploy` commands have inconsistencies in their acceptable Kubernetes config options.

You can do (`loadbalancer` in lower):
```
$ juju bootstrap --config controller-service-type=loadbalancer my-k8s
```

But in `juju deploy`:
```bash
$ juju deploy cs:~mattermost-charmers/mattermost --config kubernetes-service-type=loadbalancer
```

Generates this error:
```bash
$ juju status
Model Controller Cloud/Region Version SLA Timestamp
my-model my-k8s my-k8s 2.9-rc6 unsupported 16:45:32+01:00

App Version Status Scale Charm Store Rev OS Address Message
mattermost mattermost:5.31.0 error 1 mattermost charmstore 17 kubernetes creating or updating service for mattermost: Service "mattermost" is invalid: spec.type: Unsupported value: "loadbalancer": supported values: "ClusterIP", "ExternalName", "LoadBalancer", "NodePort"
```

There are maybe more inconsistencies that I didn't look around, but as a user I'd expect everything to be lowercase or not.

Tags: bitesize
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.9-rc6
importance: Undecided → High
status: New → Triaged
tags: added: bitesize
Ian Booth (wallyworld)
Changed in juju:
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Revision history for this message
Ian Booth (wallyworld) wrote :

Both the charm and bootstrap use the lower case version "loadbalancer".
deploy should be made consistent with this.
We should probably accept both "LoadBalancer" and "loadbalancer" and convert to "loadbalancer"

Ian Booth (wallyworld)
Changed in juju:
milestone: 2.9-rc6 → 2.8.10
Revision history for this message
Ian Booth (wallyworld) wrote :

https://github.com/juju/juju/pull/12644 fixes the issue
A validation check is put in the ensure the supplied service type is correct.

We support "loadbalancer", "external", "cluster" to match what's used for bootstrap and in charm metadata. As a fail safe, any already deployed charms which use "LoadBalancer" or "ClusterIP" etc will continue to work.

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.8.10 → 2.8.9
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.