Skip to content

example: use ServiceAccount for k8s cluster authentication #1096

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 1 commit into from
May 11, 2022

Conversation

bpmct
Copy link
Member

@bpmct bpmct commented Apr 20, 2022

This optionally allows users to authenticate to a Kubernetes cluster via a ServiceAccount, similar to workspace providers in Coder v1.

This could potentially be another example since it makes the example significantly longer.

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

codecov bot commented Apr 20, 2022

Codecov Report

Merging #1096 (98b7d05) into kubesample (9dfcbe1) will decrease coverage by 9.18%.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           kubesample    #1096      +/-   ##
==============================================
- Coverage       66.47%   57.29%   -9.19%     
==============================================
  Files             255      261       +6     
  Lines           15671    15674       +3     
  Branches          152      152              
==============================================
- Hits            10417     8980    -1437     
- Misses           4187     5711    +1524     
+ Partials         1067      983      -84     
Flag Coverage Δ
unittest-go-macos-latest 53.29% <ø> (-0.18%) ⬇️
unittest-go-postgres- ?
unittest-go-ubuntu-latest 55.84% <ø> (+0.02%) ⬆️
unittest-go-windows-2022 52.85% <ø> (+0.02%) ⬆️
unittest-js 67.63% <ø> (+0.79%) ⬆️
Impacted Files Coverage Δ
coderd/database/queries.sql.go 0.00% <0.00%> (-83.18%) ⬇️
coderd/devtunnel/tunnel.go 0.00% <0.00%> (-79.67%) ⬇️
coderd/database/pubsub.go 0.00% <0.00%> (-77.78%) ⬇️
coderd/database/db.go 0.00% <0.00%> (-55.18%) ⬇️
coderd/database/migrate.go 0.00% <0.00%> (-45.00%) ⬇️
provisionersdk/transport.go 78.72% <0.00%> (-6.39%) ⬇️
coderd/httpapi/httpapi.go 66.25% <0.00%> (-6.25%) ⬇️
coderd/coderdtest/coderdtest.go 93.80% <0.00%> (-5.08%) ⬇️
cli/start.go 57.56% <0.00%> (-4.48%) ⬇️
provisionerd/provisionerd.go 78.67% <0.00%> (-2.65%) ⬇️
... and 127 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 9dfcbe1...98b7d05. Read the comment docs.

type = string
sensitive = true
description = <<-EOF
Use docs at https://github.com/coder/coder/tree/main/examples/kubernetes-multi-service#serviceaccount to create a ServiceAccount for Coder and grab values.
Copy link
Member Author

@bpmct bpmct Apr 20, 2022

Choose a reason for hiding this comment

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

I had to link to the README because Terraform will force indent any text here and <<-EOF wasn't working with the double-spaced YAML to create a ServiceAccount on a cluster

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

I'm not sure we should promote this route right now, but until we have a better way I think it works just fine!

@bpmct bpmct merged commit 371dde8 into kubesample May 11, 2022
@bpmct bpmct deleted the bpmct/kubesample-serviceaccount branch May 11, 2022 18:19
bpmct added a commit that referenced this pull request May 11, 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>
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
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.

3 participants