Open theNewFlesh opened 12 months ago
Hi @theNewFlesh, thank you for raising this!
It is not recommended (actually, it is actively discouraged) to deploy the charm for production use from the latest/edge
channel. This is only reserved for bleeding edge features and may break at any time.
Instead, you should be installing the charm from the respective channel $version/stable
. In this case, this would be
juju deploy microk8s --channel 1.28/stable
See also https://charmhub.io/microk8s?channel=1.28/stable for a list of available tracks. Thank you!
I am deploying latest/stable
revision 62.
I need to deploy to the last K8s version 1.27.7
I will try deploying to 1.27/stable, and let you know if that works. Probably an oversight in my deployment code.
there is no 1.27 anymore... the snap exists... as do many previous versions, but its 1.28 or nothing it seems now from juju side since the version is also hard coded via constant we cannot change it unless we were to fork and DIY... the option to override "if you really want to" would be nice.
So yeah our entire stack is broken because we cannot deploy to microk8s 1.27/stable via juju, even though that snap package exists. Appears as though we are currently forced to upgrade to 1.28 immediately and ungracefully. Perhaps, charmhub is hiding 1.27 somehow?
Interesting. I wonder if you would find it useful to use the legacy version of the charm, which is a bit different, but offers a config option to choose the Kubernetes version:
juju deploy microk8s --channel legacy/stable --config channel=1.27/stable
What is legacy/stable? Is that bound to a particular version? Or is it just current release minus 1?
legacy/stable
is the previous charm version, for MicroK8s versions 1.27 or older. The Kubernetes version for that is configured through the channel
option, similar to what you need. That way, you should not get any unexpected version changes.
That's helpful. Thank you.
Summary
SNAP_CHANNEL being pinned to 'latest/edge' has broken my deployment. My deployment depends on a specific Kubernetes version, particularly a K8s config with a token variable. The latest K8s has replaced that with private keys.
What Should Happen Instead?
A developer should be able to reliably deploy Microk8s without having to worry if the snap packages, and therefore Kubernetes version, changing unexpectedly.
Reproduction Steps
Environment
Ubuntu 22.04
MicroK8s charm track: latest/stable Juju version: 3.3.0-genericlinux-amd64 Juju controller version: 3.1.6 Cloud: MaaS 3.3.4
Additional info, logs
Can you suggest a fix?
The MicroK8s charm should contain a variable to specify the version of the snap package to be installed, ie SNAP_CHANNEL. That way a developer can pin that in their deployment code.
Are you interested in contributing with a fix?
I can code something but probably can't test it well, because I don't have the setup or experience in developing Juju charms.