Skip to content

example: Add Kubernetes multi-service #1092

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

Merged
merged 3 commits into from
May 11, 2022
Merged

example: Add Kubernetes multi-service #1092

merged 3 commits into from
May 11, 2022

Conversation

kylecarbs
Copy link
Member

No description provided.

@kylecarbs kylecarbs requested a review from bpmct April 19, 2022 20:08
@kylecarbs kylecarbs self-assigned this Apr 19, 2022
@codecov
Copy link

codecov bot commented Apr 19, 2022

Codecov Report

Merging #1092 (371dde8) into main (8165a6e) will increase coverage by 0.40%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1092      +/-   ##
==========================================
+ Coverage   66.55%   66.95%   +0.40%     
==========================================
  Files         261      284      +23     
  Lines       15674    18657    +2983     
  Branches      152      241      +89     
==========================================
+ Hits        10432    12492    +2060     
- Misses       4176     4893     +717     
- Partials     1066     1272     +206     
Flag Coverage Δ
unittest-go-macos-latest 54.25% <ø> (+0.85%) ⬆️
unittest-go-postgres- 65.36% <ø> (-0.35%) ⬇️
unittest-go-ubuntu-latest 56.48% <ø> (+0.66%) ⬆️
unittest-go-windows-2022 ?
unittest-js 74.24% <ø> (+6.61%) ⬆️
Impacted Files Coverage Δ
cli/start.go 22.22% <0.00%> (-39.83%) ⬇️
site/src/xServices/users/usersXService.ts 72.91% <0.00%> (-12.80%) ⬇️
cli/gitssh.go 43.13% <0.00%> (-11.22%) ⬇️
pty/ptytest/ptytest.go 86.95% <0.00%> (-7.88%) ⬇️
site/src/xServices/StateContext.tsx 93.33% <0.00%> (-6.67%) ⬇️
cli/configssh.go 62.58% <0.00%> (-5.92%) ⬇️
site/src/pages/UsersPage/UsersPageView.tsx 94.44% <0.00%> (-5.56%) ⬇️
coderd/database/queries.sql.go 77.90% <0.00%> (-5.27%) ⬇️
coderd/workspaceagents.go 56.04% <0.00%> (-5.07%) ⬇️
site/src/components/Table/Table.tsx 96.00% <0.00%> (-4.00%) ⬇️
... and 254 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 8165a6e...371dde8. Read the comment docs.

@bpmct
Copy link
Member

bpmct commented Apr 20, 2022

What are your thoughts on including a PVC in this example? We can mount a PVC to multiple containers, I did it for your example here, but we loose all the nice ZSH stuff from the devcontainer

container {
name = "go"
image = "mcr.microsoft.com/vscode/devcontainers/go:1"
command = ["sh", "-c", coder_agent.go.init_script]
Copy link
Member

Choose a reason for hiding this comment

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

I've noticed all of these containers bring you to strange locations when you ssh in for the first time

go: /go
java: /
ubuntu /

Should the init script always do something like cd $HOME before it starts the agent?

Copy link
Member Author

Choose a reason for hiding this comment

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

It will in my other PR now!

Copy link
Member

@bpmct bpmct left a comment

Choose a reason for hiding this comment

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

This worked great, I submitted #1096 to add optional auth via ServiceAccount. Also left a comment about PVC support in this example. All your call

@kylecarbs
Copy link
Member Author

I think we'll have to do cleanup on the templates to make the names apt anyways, so I'll just leave this without volumes and such for now.

Copy link
Member

@bpmct bpmct left a comment

Choose a reason for hiding this comment

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

@kylecarbs I think this is good to go, but could you look at #1096 before merging?

@bpmct bpmct enabled auto-merge (squash) May 11, 2022 18:19
@bpmct bpmct merged commit 3024e25 into main May 11, 2022
@bpmct bpmct deleted the kubesample branch May 11, 2022 18:27
kylecarbs added a commit that referenced this pull request Jun 10, 2022
* example: Add Kubernetes multi-service

* fix: change to CODER_AGENT_TOKEN

* example: use ServiceAccount for cluster authentication (#1096)

Co-authored-by: Ben <ben@coder.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants