balchua / microk8s-actions

Bootstrap MicroK8s with Github Actions
34 stars 9 forks source link

Doesn't work with strictly confined microk8s #9

Closed barrettj12 closed 1 year ago

barrettj12 commented 1 year ago

There is now a strictly confined microk8s snap starting from version 1.25. This is available in the 1.25-strict track. This action fails when trying to install the snap from this channel. The step in my GitHub Action is:

      - name: Setup k8s
        uses: balchua/microk8s-actions@v0.2.2
        with:
          channel: "1.25-strict/stable"
          addons: '["dns", "storage"]'

and the output of this step is:

echo install microk8s..
install microk8s..
exec sudo snap install microk8s --classic --channel=1.25-strict/stable
Warning: flag --classic ignored for strictly confined snap microk8s

microk8s (1.25-strict/stable) v1.25.2 from Canonical** installed
echo creating microk8s group.
exec sudo usermod -a -G microk8s $USER
creating microk8s group.
usermod: group 'microk8s' does not exist
Error: exec: usermod: group 'microk8s' does not exist

exec sudo microk8s status --wait-ready { silent: true }
balchua commented 1 year ago

Thanks for submitting this issue. Let me have a look at this.

balchua commented 1 year ago

I have released v0.3.0 supporting the strict confinement. Please let me know how it goes.

Also note that there is a new attribute named devMode which is applicable only when using the strict confinement.

Thank you very much!

barrettj12 commented 1 year ago

Seems to work, thanks @balchua fixed by #11