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 k3s GitHub #758

Merged
merged 11 commits into from
Jul 17, 2024
Merged

Add k3s GitHub #758

merged 11 commits into from
Jul 17, 2024

Conversation

DrummyFloyd
Copy link
Contributor

@DrummyFloyd DrummyFloyd commented May 21, 2024

becasue i saw many ppl asking for the github templates, there it is

still need some test especially on TF parts

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

@fharper
Copy link
Contributor

fharper commented May 21, 2024

Thanks for the PR @DrummyFloyd 🎉

This PR will close konstructio/kubefirst#2146 .

I will try to test it today, but it will probably have to be tomorrow, sorry.

@fharper fharper added the enhancement New feature or request label May 21, 2024
@fharper
Copy link
Contributor

fharper commented May 23, 2024

We won't be able to merge this yet as to add the GitHub support, we also need to update the https://github.com/kubefirst/kubefirst-api and https://github.com/kubefirst/kubefirst-api unless it was done already when you added K3s support. I need to check that first.

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented May 23, 2024

We won't be able to merge this yet as to add the GitHub support, we also need to update the https://github.com/kubefirst/kubefirst-api and https://github.com/kubefirst/kubefirst-api unless it was done already when you added K3s support. I need to check that first.

if i remember well, it should already be on the code

but yes could be great to check =)

EDIT:
https://github.com/kubefirst/kubefirst-api/blob/5ba2497ec8f15c4f7380ff23c52d7648f83f17e7/internal/controller/git.go#L95
https://github.com/kubefirst/kubefirst/blob/986fea4d7576d1b495e949b4ec0795ec2a9ed08d/cmd/k3s/command.go#L101C119-L101C140

@fharper
Copy link
Contributor

fharper commented May 30, 2024

I was trying again the GitLab one before to ensure everything is fine on my side before trying this PR, but I get his error with the latest kubefirst release (not this branch):

{"level":"debug","time":"2024-05-30T18:23:52Z","message":"ERR: \u001b[31m╷\u001b[0m\u001b[0m"}
{"level":"debug","time":"2024-05-30T18:23:52Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[1m\u001b[31mError: \u001b[0m\u001b[0m\u001b[1mMissing newline after argument\u001b[0m"}
{"level":"debug","time":"2024-05-30T18:23:52Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m"}
{"level":"debug","time":"2024-05-30T18:23:52Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m  on terraform.tfvars line 1:"}
{"level":"debug","time":"2024-05-30T18:23:52Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m   1: list_servers_private_ips = \"[\"\u001b[4m192.168.1.6\u001b[0m\",\"192.168.1.3\",\"192.168.1.5\"]\"\u001b[0m"}
{"level":"debug","time":"2024-05-30T18:23:52Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m"}
{"level":"debug","time":"2024-05-30T18:23:52Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mAn argument definition must end with a newline."}
{"level":"debug","time":"2024-05-30T18:23:52Z","message":"ERR: \u001b[31m╵\u001b[0m\u001b[0m"}

The command is how I wrote it at https://docs.kubefirst.io/k3s/quick-start/install/cli#create-your-new-kubefirst-cluster right?

If so, maybe something changed in the Terraform provider.

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented May 30, 2024

the K3S tf provider is pinned so not a version provider issue

but if you took the exact same command as the doc say , there is some issue upon some parameters

github stuff with gitlab stuff, dunno

EDIT: from what i recall, @jarededwards did a TF provider to create the requirement stuff on CIVO VM
maybe something with TF version on your host ?

@fharper
Copy link
Contributor

fharper commented May 30, 2024

Oh yeah no, I use the correct GitLab parameters. I'll fix the docs. My question was mostly about the IPs since it's where the errors are. I created the VMs on Civo also, but it should work with any VMs anyway no? I would have assumed the issue was on my side, but the error is from Terraform while running the kubefirst command, not the script Jared created.

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented May 30, 2024

Oh yeah no, I use the correct GitLab parameters. I'll fix the docs. My question was mostly about the IPs since it's where the errors are. I created the VMs on Civo also, but it should work with any VMs anyway no? I would have assumed the issue was on my side, but the error is from Terraform while running the kubefirst command, not the script Jared created.

if something change, upon the detokenize stuff, for me it should be related to this PR
konstructio/kubefirst-api@c9da2b8
But i don't see any relveant error ^^' so tbh dunno atm , what happn

@maxiar
Copy link

maxiar commented Jun 24, 2024

Hi! Any News?

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented Jun 24, 2024

Hi! Any News?

i think it's still review =/ can't do nothing about it ^^
will ask to K1 team to have look asap if they have time =)

@fharper
Copy link
Contributor

fharper commented Jun 25, 2024

Sorry, the team is super busy, and I was on vacation. I had an issue with this integration when I tested. We quickly checked before I left, and I think we found the issue. I'll give it another go as soon as I'm done catching up on the last weeks.

@maxiar : note that you can try it yourself if you really need it asap. You'll need to use a custom gitops-template repository pointing to that branch. See https://docs.kubefirst.io/k3s/explore/gitops#using-your-own-gitops-template-repository-fork

@maxiar
Copy link

maxiar commented Jun 26, 2024

Sorry, the team is super busy, and I was on vacation. I had an issue with this integration when I tested. We quickly checked before I left, and I think we found the issue. I'll give it another go as soon as I'm done catching up on the last weeks.

@maxiar : note that you can try it yourself if you really need it asap. You'll need to use a custom gitops-template repository pointing to that branch. See https://docs.kubefirst.io/k3s/explore/gitops#using-your-own-gitops-template-repository-fork

Perfect! Good Vacations well deserved!! I will try to install the cluster using this branch "add-k3s-github", but we have a question, what version of the kuberfirst cli must be use? the latest? or compile from another WIP branch? Sorry for the dummy comment.. :)

@fharper
Copy link
Contributor

fharper commented Jun 26, 2024

When adding GitLab support, Drummy made sure GitHub was functional with the kubefirst CLI, so you only need to use this branch. To do so, add these flags (more information on the flags in the docs link I shared in my previous message) to the command for K3s (see https://docs.kubefirst.io/k3s/quick-start/install/cli/#create-your-new-kubefirst-cluster)

--gitops-template-url https://github.com/DrummyFloyd/gitops-template --gitops-template-branch add-k3s-github

I'm testing it right now, and with the fix I made before leaving for vacation, I'm passed the step where it was failing. So far so good, I'll keep you posted.

@fharper
Copy link
Contributor

fharper commented Jun 26, 2024

With the k3s PR, I have now an issue with the SSH key. The file is readable, and exist, but it seems like k1 can't find it.

{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m╷\u001b[0m\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[1m\u001b[31mError: \u001b[0m\u001b[0m\u001b[1mInvalid function argument\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m  on main.tf line 24, in module \"k3s\":"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m  24:         private_key = file(\u001b[4mvar.ssh_private_key\u001b[0m)\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m    \u001b[90m├────────────────\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m    \u001b[90m│\u001b[0m \u001b[1mvar.ssh_private_key\u001b[0m is \"/Users/fharper/.ssh/id_ed25519\""}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mInvalid value for \"path\" parameter: no file exists at"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\"/Users/fharper/.ssh/id_ed25519\"; this function works only with files that"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mare distributed as part of the configuration source code, so if this file"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mwill be created by a resource in this configuration you must instead obtain"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mthis result from an attribute of that resource."}

Any idea what is going on here?

I'll give a try to the GitLab one as it's been a while, to see if it's a GitHub issue, a k3s one, or probably a code 18 😅

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented Jun 26, 2024

With the k3s PR, I have now an issue with the SSH key. The file is readable, and exist, but it seems like k1 can't find it.

{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m╷\u001b[0m\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[1m\u001b[31mError: \u001b[0m\u001b[0m\u001b[1mInvalid function argument\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m  on main.tf line 24, in module \"k3s\":"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m  24:         private_key = file(\u001b[4mvar.ssh_private_key\u001b[0m)\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m    \u001b[90m├────────────────\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m    \u001b[90m│\u001b[0m \u001b[1mvar.ssh_private_key\u001b[0m is \"/Users/fharper/.ssh/id_ed25519\""}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mInvalid value for \"path\" parameter: no file exists at"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\"/Users/fharper/.ssh/id_ed25519\"; this function works only with files that"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mare distributed as part of the configuration source code, so if this file"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mwill be created by a resource in this configuration you must instead obtain"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mthis result from an attribute of that resource."}

Any idea what is going on here?

I'll give a try to the GitLab one as it's been a while, to see if it's a GitHub issue, a k3s one, or probably a code 18 😅

will check this asap , will ping you on slack when it's done ) surely a template issue here like before !

EDIT: still debugging atm i don't know where this issue come from

@maxiar can you please try on your end and tell me if you can reproduce ?

@DrummyFloyd
Copy link
Contributor Author

ok i reproduced and found the issue issue , need to discuss with k1 teams, about solutions , once i 've discussed ith them will push a hotfix for that =)
and the template should be fine !

@maxiar
Copy link

maxiar commented Jul 2, 2024

With the k3s PR, I have now an issue with the SSH key. The file is readable, and exist, but it seems like k1 can't find it.

{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m╷\u001b[0m\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[1m\u001b[31mError: \u001b[0m\u001b[0m\u001b[1mInvalid function argument\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m  on main.tf line 24, in module \"k3s\":"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m  24:         private_key = file(\u001b[4mvar.ssh_private_key\u001b[0m)\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m    \u001b[90m├────────────────\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m    \u001b[90m│\u001b[0m \u001b[1mvar.ssh_private_key\u001b[0m is \"/Users/fharper/.ssh/id_ed25519\""}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mInvalid value for \"path\" parameter: no file exists at"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\"/Users/fharper/.ssh/id_ed25519\"; this function works only with files that"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mare distributed as part of the configuration source code, so if this file"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mwill be created by a resource in this configuration you must instead obtain"}
{"level":"debug","time":"2024-06-26T17:16:44Z","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mthis result from an attribute of that resource."}

Any idea what is going on here?
I'll give a try to the GitLab one as it's been a while, to see if it's a GitHub issue, a k3s one, or probably a code 18 😅

will check this asap , will ping you on slack when it's done ) surely a template issue here like before !

EDIT: still debugging atm i don't know where this issue come from

@maxiar can you please try on your end and tell me if you can reproduce ?

Sorry for the delay, I have some problems with my cloud hosting services, but it's ready to test when you want...

@fharper
Copy link
Contributor

fharper commented Jul 2, 2024

@maxiar: wait for the next fix on this PR. As @DrummyFloyd wrote, he identified the issue, and we discussed the solutions, so a fix in coming.

@maxiar
Copy link

maxiar commented Jul 2, 2024

@maxiar: wait for the next fix on this PR. As @DrummyFloyd wrote, he identified the issue, and we discussed the solutions, so a fix in coming.

Perfect...

@DrummyFloyd
Copy link
Contributor Author

hot fix made here
konstructio/kubefirst-api#353

seems to work on my end, but will ask for some test on k1 team to confirm that =)

@fharper
Copy link
Contributor

fharper commented Jul 4, 2024

The API changes are merged, will test this PR today.

@maxiar
Copy link

maxiar commented Jul 4, 2024

Hi! I try to test the fix using this command:

export GITHUB_TOKEN=XXXXXX

kubefirst beta k3s create \
    --servers-args "--disable traefik,--write-kubeconfig-mode 0644" \
    --alerts-email [email protected] \
    --domain-name maxiar.dev \
    --git-provider github \
    --servers-private-ips 10.0.1.2,10.0.1.3,10.0.1.1 \
    --servers-public-ips 65.21.63.182,95.217.216.146,37.27.15.187 \
    --ssh-privatekey ~/.ssh-tf-hetzner-cloud/id_rsa.key \
    --ssh-user root \
    --cluster-name kubefirst \
    --gitops-template-url https://github.com/DrummyFloyd/gitops-template \
    --gitops-template-branch add-k3s-github

but I get and error: Error: please provide a github organization using the --github-org flag because I've a personal account (https://github.com/maxiar) is not an organizacion.. It's mandatory? When I added --github-org maxiar but not works...

kubefirst beta k3s create \
    --servers-args "--disable traefik,--write-kubeconfig-mode 0644" \
    --alerts-email [email protected] \
    --domain-name maxiar.dev \
    --git-provider github \
    --github-org maxiar \
    --servers-private-ips 10.0.1.2,10.0.1.3,10.0.1.1 \
    --servers-public-ips 65.21.63.182,95.217.216.146,37.27.15.187 \
    --ssh-privatekey ~/.ssh-tf-hetzner-cloud/id_rsa.key \
    --ssh-user root \
    --cluster-name kubefirst \
    --gitops-template-url https://github.com/DrummyFloyd/gitops-template \
    --gitops-template-branch add-k3s-github

Error: something went wrong calling GitHub API during org lookup, http
status code is: 404, and response is: "{"message":"Not
Found","documentation_url":"https://docs.github.com/rest/orgs/members#get-
organization-membership-for-a-user","status":"404"}"

EDIT:: Another thing: I ommited the --dns-provider cloudflare parameter because I haven't a cloudfare account is it ok??
Can you help me? Thanks in advanced

@fharper
Copy link
Contributor

fharper commented Jul 4, 2024

It's mandatory? When I added --github-org maxiar but not works...

It is for clouds support that aren't k3d. You can create a free one with a free account on GitHub.

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented Jul 4, 2024

It's mandatory? When I added --github-org maxiar but not works...

It is for clouds support that aren't k3d. You can create a free one with a free account on GitHub.

  • You will need make something like this for the sshbkey

--ssh-privatekey $(cat ~/.ssh/id_rsa)

and the dns-provider is mandatory

@fharper
Copy link
Contributor

fharper commented Jul 8, 2024

Why the cluster name is kubefirst and not maxiar (as cluster-name paramerter)?

kubefirst create an installer cluster and use k3d so k3s can use the API. It's the same for any clouds (except k3d), it all create a k3d cluster first, so it's normal.

Why I see in the logs.... "install k3d" or "Creating k3d cluster" instead k3s, it's very confusing..

See answer to your first question.

I get the same errors, using the latest kubefirst (binary, no compiled) and pass the --ssh-privatekey ~/.ssh/id_rsa (by file instead text), check this another logs..

It won't work, the change to receive the SSH key was done in the API, so this won't work until tou cat the content like you did in your first attempt.

{"level":"debug","time":"2024-07-04T21:50:07-03:00","message":"unable to reach "console.kubefirst.dev/api/proxyHealth" (15/60)"}

You didn't reach the k3s stage with this error. There is a problem with your k3d installer.

I attach the my logs with multiples test to analyze.

Seems like this is a certificate issue, see https://docs.kubefirst.io/k3d/quick-start/install#install-the-ca-certificate-authority-of-mkcert-in-your-trusted-store . I don't think you needed to do that for the installer, just for k3d. What OS are you trying this from?

If you need to test something, tell me... I've the local environment prepared.

For now it's good, I should be able to give it a test later today 🤞, so until I do my test, don't take more time trying yours, unless you really want to.

@fharper
Copy link
Contributor

fharper commented Jul 9, 2024

So I was able to test this PR again today. The SSH issue I had is fixed with the API PR as we thought, thanks Drummy!

I wasn't completely successful though.

  1. The CLI step after "Initializing Vault" is empty. It may be related to the second point though.

CleanShot 2024-07-09 at 09 45 23@2x

  1. I got stuck at this step as there is an error in the logs: it's looking for a AWS key. I assume it's an issue as one shouldn't need AWS in this process at all, unless I'm mistaken?

CleanShot 2024-07-09 at 09 49 19@2x

  1. At any point, the CLI should exit with an error if there is an issue, and it cannot continue. The process is going strong after a while, even if now it's just displaying the 500 error in loop.

CleanShot 2024-07-09 at 09 45 53@2x

In any cases, right now, the #1 & #3 could be fixed by us at some point, but #2 is more a question for you @DrummyFloyd . As soon as I can, I'll give a try also with GitLab to see if it's specific to this PR or if I can reproduce everywhere with k3s.

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented Jul 9, 2024

ok good, we're going forward =D ( i ported the fix to Gitlab to in this PR fyi)

like i said , in the first comment, of the PR, i wasn't really sure about TF stuff, so maybe, it come from there,

yes please try upon GITLAB , to check if you have the same issue

quite hard to check everything on all theses template + Tf stuff ^^

EDIT: @fharper i pushed few fix

@fharper
Copy link
Contributor

fharper commented Jul 9, 2024

I didn't have time to test with GitLab, but testing with the latest fix on this PR + GitHub now.

Any ideas why you have none of the issues I get when I test!?

For GitLab, my plan was to test with the latest release, am I correct? Or should I use this PR since you added a fix here also? Just to be sure.

Unrelated, I was struggling to create the VMs before being able to test (unrelated to K3s, something based on my machine configurations), so from now on, I' gonna be able to test way faster.

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented Jul 9, 2024

I didn't have time to test with GitLab, but testing with the latest fix on this PR + GitHub now.

Any ideas why you have none of the issues I get when I test!?

because i did not test the entire mechanism ^^'

For GitLab, my plan was to test with the latest release, am I correct? Or should I use this PR since you added a fix here also? Just to be sure.

you have to use the template from this PR f0a738b

@fharper
Copy link
Contributor

fharper commented Jul 9, 2024

So at the Vault configuration (or right after), something weird happened with GitHub. It tried to access a cluster on DigitalOcean (and really tried as Little Snitch asked me to accept or not a connection to digitalocean.com). I assumed it's some copy/paste somewhere?

CleanShot 2024-07-09 at 16 40 42@2x

@fharper
Copy link
Contributor

fharper commented Jul 9, 2024

I just tested GitLab and it reached mostly the end. I'm stuck at the "Wrapping up" step. The last log entries are "waiting for final sync wave Deployment to transition to Running" and "waiting for crossplane Deployment to be created" . The only thing I can see in the cluster is GitLab runner pods still running with errors in their logs (see screenshot).

CleanShot 2024-07-09 at 17 33 31@2x

I can access the Vault interface, but not Argo CD nor the management (console). They all give me this error.

CleanShot 2024-07-09 at 17 36 20@2x

@DrummyFloyd
Copy link
Contributor Author

So at the Vault configuration (or right after), something weird happened with GitHub. It tried to access a cluster on DigitalOcean (and really tried as Little Snitch asked me to accept or not a connection to digitalocean.com). I assumed it's some copy/paste somewhere?

CleanShot 2024-07-09 at 16 40 42@2x

because some tf stuff was a copy/paste from DO template, i may have missed some Do_token will check taht

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented Jul 9, 2024

I just tested GitLab and it reached mostly the end. I'm stuck at the "Wrapping up" step. The last log entries are "waiting for final sync wave Deployment to transition to Running" and "waiting for crossplane Deployment to be created" . The only thing I can see in the cluster is GitLab runner pods still running with errors in their logs (see screenshot).

CleanShot 2024-07-09 at 17 33 31@2x

I can access the Vault interface, but not Argo CD nor the management (console). They all give me this error.

CleanShot 2024-07-09 at 17 36 20@2x

at this point, i think something change on kubefirst/kubefrist-api because @jarededwards fixed that before the K3S-gitlab was merge with everything =)

EDIT:
or i could be a GITLAB change from how token are provded (if i remember well , they change abreaking change upon SaaS) dunno how the compatibility is on this TF + gitlab runner registration

https://docs.gitlab.com/runner/install/kubernetes.html#required-configuration
20240709_23h58m21s_grim
=s

=> including that breaking change all of your GITLAB tempalte are break =/ actual version (at least in europe 17.2)

@fharper
Copy link
Contributor

fharper commented Jul 10, 2024

I doubt it's a GitLab issue, as in, how GitLab works, the product, not how we use it, since GitLab is working on other clouds.

As for GitHub, I'll give it another test hopefully today.

@fharper
Copy link
Contributor

fharper commented Jul 10, 2024

So the GitLab issue may be related to https://github.com/kubefirst/gitops-template/pull/771/files

@DrummyFloyd
Copy link
Contributor Author

DrummyFloyd commented Jul 10, 2024

So the GitLab issue may be related to https://github.com/kubefirst/gitops-template/pull/771/files

is totallyy that ^^, will rebase my PR to get these changes =)

@fharper
Copy link
Contributor

fharper commented Jul 10, 2024

I'm trying GitHub now.

@fharper
Copy link
Contributor

fharper commented Jul 10, 2024

So I ended up with nearly the same state for GitHub than GitLab. It's stuck at the "wrapping up" step, and the last log entry is waiting on crossplane deployment.

Here the state of the pods

CleanShot 2024-07-10 at 14 54 14@2x

I'll wait on this GitHub fix to test GitLab again, as I assume the token issue was fixed for GitLab Runner, but I may end up at the same place.

@fharper
Copy link
Contributor

fharper commented Jul 16, 2024

We are soooo close!

So I tried GitHub and it worked on first try: I moved passed my crossplane issue.

I tried GitLab, but ended up with a new issue (see screenshot). I will give it a second try, but I wonder if it's not one of the latest changes when we removed GitLab stuff.

CleanShot 2024-07-16 at 16 38 04@2x

Copy link
Contributor

@fharper fharper left a comment

Choose a reason for hiding this comment

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

We have an issue with Atlantis + Metaphor on GitLab, but since K3s is still in beta, and that this PR was about GitHub, we are finally good to merge and release this 🎉

Thanks a lot @DrummyFloyd & everyone who helped!

@fharper fharper merged commit 80c820f into konstructio:main Jul 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants