-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add k3s GitHub #758
Conversation
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
17b5dc3
to
cf893ee
Compare
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. |
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: |
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. |
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
EDIT: from what i recall, @jarededwards did a TF provider to create the requirement stuff on CIVO VM |
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 |
Hi! Any News? |
i think it's still review =/ can't do nothing about it ^^ |
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 |
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.. :) |
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)
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. |
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.
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 ? |
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 =) |
Sorry for the delay, I have some problems with my cloud hosting services, but it's ready to test when you want... |
@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... |
0c191f3
to
f0a738b
Compare
hot fix made here seems to work on my end, but will ask for some test on k1 team to confirm that =) |
The API changes are merged, will test this PR today. |
Hi! I try to test the fix using this command:
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...
Error: something went wrong calling GitHub API during org lookup, http EDIT:: Another thing: I ommited the --dns-provider cloudflare parameter because I haven't a cloudfare account is it ok?? |
It is for clouds support that aren't k3d. You can create a free one with a free account on GitHub. |
and the dns-provider is mandatory |
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.
See answer to your first question.
It won't work, the change to receive the SSH key was done in the API, so this won't work until tou
You didn't reach the k3s stage with this error. There is a problem with your k3d installer.
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?
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. |
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.
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. |
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 |
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. |
because i did not test the entire mechanism ^^'
you have to use the template from this PR f0a738b |
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). I can access the Vault interface, but not Argo CD nor the management (console). They all give me this error. |
because some tf stuff was a copy/paste from DO template, i may have missed some |
at this point, i think something change on EDIT: https://docs.gitlab.com/runner/install/kubernetes.html#required-configuration => including that breaking change all of your GITLAB tempalte are break =/ actual version (at least in europe |
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. |
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 =) |
eb231ab
to
62168c8
Compare
I'm trying GitHub now. |
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 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. |
There was a problem hiding this 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!
becasue i saw many ppl asking for the github templates, there it is
still need some test especially on TF parts
fix some gitlab template based on feat: gitlab runner #771
fix
TF_VAR_ssh_private_key
, now passed the content from ARG toK1-API
asTF_VAR
fix: pass SSH private key content as environment variable for K3s kubefirst-api#353