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

[installer]: add validate cluster command to the installer #6234

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

mrsimonemms
Copy link
Contributor

Description

Runs validation checks against the cluster

  • kernel >= 5.4.0-0
  • containerd used as runtime
  • cert-manager installed
  • affinity labels applied to nodes

Related Issue(s)

Fixes #6210

How to test

With the appropriate config in ~/.kube/config (or specifying your own with --kubeconfig= or KUBECONFIG envvar), run go run . validate cluster

Release Notes

Validate the cluster is in a state for Gitpod to be installed to

Documentation

@aledbf
Copy link
Member

aledbf commented Oct 15, 2021

Testing this against a GKE cluster I get an error in "Kernel version" -> "message": "Invalid Semantic Version"

@aledbf aledbf self-requested a review October 15, 2021 12:43
installer/cmd/root.go Outdated Show resolved Hide resolved
@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Oct 15, 2021

Testing this against a GKE cluster I get an error in "Kernel version" -> "message": "Invalid Semantic Version"

@aledbf That's strange. What version comes out when you run kubectl get node -o wide. I've tried against 5.4.0-1049-gke on GKE and 5.11.0-37-generic on Kind and both validate.

I've also added in the detected Kernel version into the error message.

@mrsimonemms mrsimonemms marked this pull request as ready for review October 15, 2021 13:14
@codecov
Copy link

codecov bot commented Oct 15, 2021

Codecov Report

Merging #6234 (b06be37) into main (79865e2) will decrease coverage by 12.95%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #6234       +/-   ##
==========================================
- Coverage   19.04%   6.08%   -12.96%     
==========================================
  Files           2      10        +8     
  Lines         168     854      +686     
==========================================
+ Hits           32      52       +20     
- Misses        134     800      +666     
  Partials        2       2               
Flag Coverage Δ
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
installer-app 6.08% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
installer/pkg/common/common.go 1.34% <ø> (ø)
components/local-app/pkg/auth/pkce.go
components/local-app/pkg/auth/auth.go
installer/pkg/components/ws-manager/tlssecret.go 0.00% <0.00%> (ø)
...staller/pkg/components/ws-manager/networkpolicy.go 0.00% <0.00%> (ø)
...components/ws-manager/unpriviledged-rolebinding.go 0.00% <0.00%> (ø)
installer/pkg/common/render.go 30.30% <0.00%> (ø)
installer/pkg/components/ws-manager/configmap.go 23.45% <0.00%> (ø)
installer/pkg/components/ws-manager/rolebinding.go 0.00% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79865e2...b06be37. Read the comment docs.

@aledbf
Copy link
Member

aledbf commented Oct 15, 2021

kubectl get node -o wide

Some nodes (Container-Optimized OS from Google) return 5.4.120+

@aledbf
Copy link
Member

aledbf commented Oct 15, 2021

/approve

@mrsimonemms
Copy link
Contributor Author

/assign @csweichel

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Oct 18, 2021

@aledbf Hmmm, the 5.4.120+ doesn't render as a valid semantic version in the package I've got. I've rewritten the error message so it renders as a warning and let the user decide.

@mrsimonemms mrsimonemms marked this pull request as ready for review October 18, 2021 10:48
@csweichel
Copy link
Contributor

/lgtm

@roboquat roboquat added the lgtm label Oct 18, 2021
@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: bc87b63d1b0fcfa7a2fa88e84cba12e8ec3133fd

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, csweichel

Associated issue: #6210

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit 7623c5f into main Oct 18, 2021
@roboquat roboquat deleted the sje/installer-validate-cluster branch October 18, 2021 14:42
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/XL team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[installer] Check target cluster for installation prerequisites
4 participants