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] Registry facade should not use a port from node ports range #8580

Merged
merged 4 commits into from
Mar 4, 2022

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Mar 3, 2022

Description

Some CNI providers (as Cilium) do not allow overlap between hostPorts and nodePorts

Release Notes

[installer] Registry facade should not use a port from node ports range

@aledbf aledbf requested review from a team March 3, 2022 19:55
@github-actions github-actions bot added team: delivery Issue belongs to the self-hosted team team: workspace Issue belongs to the Workspace team labels Mar 3, 2022
@codecov
Copy link

codecov bot commented Mar 3, 2022

Codecov Report

Merging #8580 (a6ed7e3) into main (7ac5d9d) will decrease coverage by 4.94%.
The diff coverage is 0.00%.

❗ Current head a6ed7e3 differs from pull request most recent head feb6d5f. Consider uploading reports for the commit feb6d5f to get more accurate results

Impacted file tree graph

@@            Coverage Diff            @@
##             main   #8580      +/-   ##
=========================================
- Coverage   12.31%   7.37%   -4.95%     
=========================================
  Files          20      32      +12     
  Lines        1161    2225    +1064     
=========================================
+ Hits          143     164      +21     
- Misses       1014    2058    +1044     
+ Partials        4       3       -1     
Flag Coverage Δ
components-gitpod-cli-app 11.17% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
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 ?
install-installer-raw-app 4.30% <0.00%> (?)

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

Impacted Files Coverage Δ
install/installer/pkg/common/networkpolicies.go 0.00% <0.00%> (ø)
components/local-app/pkg/auth/pkce.go
components/local-app/pkg/auth/auth.go
...staller/pkg/components/ws-manager/networkpolicy.go 0.00% <0.00%> (ø)
install/installer/pkg/common/ca.go 0.00% <0.00%> (ø)
...l/installer/pkg/components/ws-manager/tlssecret.go 0.00% <0.00%> (ø)
install/installer/pkg/common/objects.go 0.00% <0.00%> (ø)
install/installer/pkg/common/storage.go 0.00% <0.00%> (ø)
...nstall/installer/pkg/components/ws-manager/role.go 0.00% <0.00%> (ø)
install/installer/pkg/common/render.go 0.00% <0.00%> (ø)
... and 6 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 7ac5d9d...feb6d5f. Read the comment docs.

sagor999
sagor999 previously approved these changes Mar 3, 2022
@aledbf aledbf force-pushed the aledbf/cil branch 3 times, most recently from a6ed7e3 to 76f45e0 Compare March 4, 2022 00:13
@mrsimonemms
Copy link
Contributor

/hold

Approving, but adding hold so @aledbf or @sagor999 can merge when ready

mrsimonemms
mrsimonemms previously approved these changes Mar 4, 2022
@aledbf aledbf dismissed stale reviews from csweichel and mrsimonemms via feb6d5f March 4, 2022 11:16
@aledbf
Copy link
Member Author

aledbf commented Mar 4, 2022

/hold cancel

@aledbf
Copy link
Member Author

aledbf commented Mar 4, 2022

with the changes, we can run Gitpod in a cluster using Cilium

Screenshot from 2022-03-04 08-33-55

and use Hubble to see dropped packages

Screenshot from 2022-03-04 08-37-42

@csweichel
Copy link
Contributor

with the changes, we can run Gitpod in a cluster using Cilium

Screenshot from 2022-03-04 08-33-55

and use Hubble to see dropped packages

Nice. Is there alerting that could use? E.g. an alert if a package makes its way through to the Google Metadata API server?

@aledbf
Copy link
Member Author

aledbf commented Mar 4, 2022

Nice. Is there alerting that could use? E.g. an alert if a package makes its way through to the Google Metadata API server?

We can add one using the drop metric https://docs.cilium.io/en/stable/operations/metrics/#drop

Copy link
Contributor

@mrsimonemms mrsimonemms left a comment

Choose a reason for hiding this comment

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

/hold

Happy with that, just on the question raised. If that's fine, just remove the hold

@roboquat roboquat merged commit 6d59526 into main Mar 4, 2022
@roboquat roboquat deleted the aledbf/cil branch March 4, 2022 15:10
@iQQBot
Copy link
Contributor

iQQBot commented Mar 4, 2022

image

Unfortunately, this breaks our preview environment @aledbf

@sagor999
Copy link
Contributor

sagor999 commented Mar 4, 2022

Ah, I think preview env is still using helm chart? So maybe that change needs to be done in there too now

@iQQBot
Copy link
Contributor

iQQBot commented Mar 4, 2022

no, it's using installer

@iQQBot
Copy link
Contributor

iQQBot commented Mar 4, 2022

In order to install multiple gitpod in a single kubernetes, we modified the hostport of registry-facade using the post-install script, but not in the PodSecurityPolicy, which prevented the registry-facade from starting

@aledbf
Copy link
Member Author

aledbf commented Mar 4, 2022

Now is clear why we had a range in the policy

Fix #8612

@roboquat roboquat added the deployed: workspace Workspace team change is running in production label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production release-note size/L team: delivery Issue belongs to the self-hosted team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants