Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add microk8s controller #1216

Merged
merged 6 commits into from
Jun 11, 2024
Merged

Add microk8s controller #1216

merged 6 commits into from
Jun 11, 2024

Conversation

ale8k
Copy link
Contributor

@ale8k ale8k commented May 21, 2024

Enables local qa setup for microk8s without the hassle of doing 100000000 steps.

Copy link

⚠️ This PR contains unsigned commits. To get your PR merged, please sign those commits (git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch (git push --force-with-lease).

If you're new to commit signing, there are different ways to set it up:

Sign commits with gpg

Follow the steps below to set up commit signing with gpg:

  1. Generate a GPG key
  2. Add the GPG key to your GitHub account
  3. Configure git to use your GPG key for commit signing
Sign commits with ssh-agent

Follow the steps below to set up commit signing with ssh-agent:

  1. Generate an SSH key and add it to ssh-agent
  2. Add the SSH key to your GitHub account
  3. Configure git to use your SSH key for commit signing
Sign commits with 1Password

You can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process.

Learn how to use 1Password to sign your commits.

Watch the demo

Copy link
Contributor

@kian99 kian99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks a bunch! Just some comments before I approve.

local/jimm/setup-microk8s-controller.sh Show resolved Hide resolved
qa-lxd.sh Outdated Show resolved Hide resolved
qa-microk8s.sh Outdated Show resolved Hide resolved
local/jimm/add-microk8s-controller.sh Outdated Show resolved Hide resolved
local/README.md Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
local/jimm/setup-controller.sh Show resolved Hide resolved
local/jimm/setup-controller.sh Show resolved Hide resolved
qa-lxd.sh Outdated Show resolved Hide resolved
qa-microk8s.sh Outdated Show resolved Hide resolved
@@ -0,0 +1,13 @@
#!/bin/bash

# Host-access has some issues, TLDR to fix it:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be automated? like.. adding microk8s snap install to makefile target dev-env-setup along with enable storage and host-access..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit hesitant on this idk, we could put it in make target??

qa-lxd.sh Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@@ -4,15 +4,13 @@
# It will bootstrap a Juju controller and configure the necessary config to enable the controller
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion.. should this be renamed to setup-lxd-controller.sh to keep the naming convention in line with setup-microk8s-controller.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah can do, but you won't see this when running top level scripts

local/jimm/setup-microk8s-controller.sh Show resolved Hide resolved
@ale8k ale8k force-pushed the add-microk8s-controller branch from e705e13 to c0fca0e Compare May 21, 2024 12:06
@ale8k ale8k force-pushed the add-microk8s-controller branch from 396ce2f to d1f4528 Compare May 21, 2024 13:12
qa-lxd.sh Outdated Show resolved Hide resolved
qa-lxd.sh Outdated Show resolved Hide resolved
qa-microk8s.sh Outdated
@@ -0,0 +1,40 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree with @kian99 .. both qa scripts should live in ./local/

Copy link
Contributor

@kian99 kian99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just curious if the microk8s controller works?

@ale8k
Copy link
Contributor Author

ale8k commented May 24, 2024

lgtm, just curious if the microk8s controller works?

It does, me and babak added a model and deploy hello-kubecon

Copy link
Contributor

@pkulik0 pkulik0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, only one small comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe cleanup() could be extracted to a separate file and sourced to keep it DRY since the only difference between the fn in qa-lxd and qa-microk8s is the name passed to juju destroy-controller? If some changes in the future affect this it's always nicer to have to bring only one script up-to-date.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree, but just want to land this as its been waiting ages, can come back and fix in later?

@ale8k ale8k merged commit 23fe352 into canonical:v3 Jun 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants