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

Fixes to install workspace components to GKE with InCluster dependencies #6323

Merged
merged 8 commits into from
Oct 28, 2021

Conversation

mrsimonemms
Copy link
Contributor

@mrsimonemms mrsimonemms commented Oct 20, 2021

Description

These are the bugfixes required to get the application deployed to a GKE cluster. As this was getting large, this has been split into Workspace and Meta component

This has made a change to the config file as well:

  • added workspace.runtime.containerdSocket (with default value). This is necessary as containerd can be in different locations (eg, in Azure)
  • added Probe in the WorkspaceTemplates. This won't be defined in most instances, but is necessary for completion

Also, I've changed how the DB init scripts work. I've removed the scripts 00-testdb-user.sql and 01-create-user.sql replaced with the Helm configuration for creating a username/database. I don't think this will actually present a functional change, but happy to have a conversation about this - this appears only to be run with InCluster databases.

Related Issue(s)

Fixes #6276

How to test

  • Get kubeconfig gcloud container clusters get-credentials sje-europe-west2-primary-gke --region europe-west2 --project sje-self-hosted-playground (I'm also using this cluster)
  • go run . render --config example-config.yaml | kubectl apply -f -
  • run watch kubectl get pods and watch the pods come to life - this takes ~3 mins

Release Notes

Successfully install the workspace components to a cluster

Documentation

@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #6323 (e16e081) into main (a996c98) will decrease coverage by 1.54%.
The diff coverage is 0.00%.

❗ Current head e16e081 differs from pull request most recent head 680b09c. Consider uploading reports for the commit 680b09c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6323      +/-   ##
==========================================
- Coverage   19.04%   17.49%   -1.55%     
==========================================
  Files           2       23      +21     
  Lines         168     3006    +2838     
==========================================
+ Hits           32      526     +494     
- Misses        134     2417    +2283     
- Partials        2       63      +61     
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 ?
components-ws-daemon-app 22.04% <0.00%> (?)
components-ws-daemon-lib 22.04% <0.00%> (?)
installer-app 6.07% <0.00%> (?)

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

Impacted Files Coverage Δ
components/ws-daemon/pkg/content/config.go 33.33% <0.00%> (ø)
installer/pkg/common/common.go 1.34% <ø> (ø)
installer/pkg/common/objects.go 0.00% <0.00%> (ø)
installer/pkg/components/ws-manager/configmap.go 23.45% <0.00%> (ø)
installer/pkg/components/ws-manager/deployment.go 0.00% <0.00%> (ø)
installer/pkg/components/ws-manager/tlssecret.go 0.00% <0.00%> (ø)
components/local-app/pkg/auth/auth.go
components/local-app/pkg/auth/pkce.go
...components/ws-manager/unpriviledged-rolebinding.go 0.00% <0.00%> (ø)
... and 21 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 a996c98...680b09c. Read the comment docs.

@mrsimonemms mrsimonemms force-pushed the sje/installer-gke branch 4 times, most recently from cd8d53f to 9d9a1d3 Compare October 22, 2021 09:12
@mrsimonemms mrsimonemms changed the title Installs a GKE InCluster deployment Fixes to install workspace component to GKE with InCluster dependencies Oct 22, 2021
@mrsimonemms mrsimonemms changed the title Fixes to install workspace component to GKE with InCluster dependencies Fixes to install workspace components to GKE with InCluster dependencies Oct 22, 2021
@mrsimonemms mrsimonemms self-assigned this Oct 22, 2021
@mrsimonemms mrsimonemms marked this pull request as ready for review October 22, 2021 09:27
@princerachit
Copy link
Contributor

princerachit commented Oct 25, 2021

Looks like the cluster is gone. I am going to create a new cluster and use it to test this installation.

Can you give me another cluster to test?

Copy link
Contributor

@princerachit princerachit left a comment

Choose a reason for hiding this comment

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

I think some recent commit broke the code:

gitpod /workspace/gitpod/installer $ go run . render --config example-config.yaml | kubectl apply -f -# github.com/gitpod-io/gitpod/installer/pkg/components/content-service
pkg/components/content-service/objects.go:14:65: cannot use nil as type bool in argument to common.GenerateService
# github.com/gitpod-io/gitpod/installer/pkg/components/dashboard
pkg/components/dashboard/objects.go:13:65: cannot use nil as type bool in argument to common.GenerateService
# github.com/gitpod-io/gitpod/installer/pkg/components/server
pkg/components/server/objects.go:16:65: cannot use nil as type bool in argument to common.GenerateService
# github.com/gitpod-io/gitpod/installer/pkg/components/image-builder-mk3
pkg/components/image-builder-mk3/objects.go:16:65: cannot use nil as type bool in argument to common.GenerateService

Yeah, my bad. I'll get this fixed before out 9:30BST call

installer/cmd/versions.yaml Show resolved Hide resolved
Copy link
Contributor

@princerachit princerachit left a comment

Choose a reason for hiding this comment

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

The changes are humongous. Can you make this 3 commits with different concerns? I can review each commit individually.

NVM the 8 commits are good enough

@mrsimonemms mrsimonemms force-pushed the sje/installer-gke branch 5 times, most recently from 2003367 to a4cb89f Compare October 26, 2021 07:36
installer/pkg/components/server/deployment.go Show resolved Hide resolved
installer/pkg/components/ws-manager/configmap.go Outdated Show resolved Hide resolved
installer/pkg/components/ws-manager/deployment.go Outdated Show resolved Hide resolved
installer/example-config.yaml Show resolved Hide resolved
installer/pkg/common/render.go Outdated Show resolved Hide resolved
installer/pkg/components/docker-registry/secret.go Outdated Show resolved Hide resolved
@mrsimonemms mrsimonemms force-pushed the sje/installer-gke branch 2 times, most recently from 9a66833 to 46ee3c1 Compare October 26, 2021 08:51
installer/pkg/common/render.go Outdated Show resolved Hide resolved
installer/pkg/common/objects.go Outdated Show resolved Hide resolved
Simon Emms added 5 commits October 27, 2021 11:40
The cluster configuration is designed for components that are always installed to the cluster. These
will mostly be security related rather than functional. This also introduces the concept of common
objects that are installed regardless of the installation type.
This now installs the workspace components to a cluster using an InCluster database and registry
@csweichel
Copy link
Contributor

/lgtm

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: def100f1c468b05432cb6d58c2930565587c0046

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csweichel

Associated issue: #6276

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 bdcae19 into main Oct 28, 2021
@roboquat roboquat deleted the sje/installer-gke branch October 28, 2021 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Installer]: successfully deploy to GKE with InCluster configuration
4 participants