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

Auto import kubernetes template in Helm charts #3550

Merged
merged 8 commits into from Aug 25, 2022
Merged

Conversation

deansheather
Copy link
Member

@deansheather deansheather commented Aug 18, 2022

  • Adds new template kubernetes which is just a basic, single-container pod
  • Adds new flag --auto-import-template (CODER_TEMPLATE_AUTOIMPORT) which can specify kubernetes and/or kubernetes-multi-service
    • After the first user (and org) is created, this will automatically create templates based on default template variables or information detected from the environment
      • For example, if we detect we're running in K8s then we use the namespace from the serviceaccount and use SA auth instead of kubeconfig auth
  • Adds tests for the auto import template stuff
  • Adds an SA to the helm chart
  • Adds new helm value coder.serviceAccount.workspacePerms which controls whether to give the new SA perms to do workspace-related things

Closes #3265

Copy link
Collaborator

@bpmct bpmct left a comment

Adds new flag --auto-import-template (CODER_TEMPLATE_AUTOIMPORT) which can specify kubernetes and/or kubernetes-multi-service

Do you specify multiple templates separated by commas?

We'll also want to add this to the helm docs before merging 👍🏼

The auto-import worked great! I ran into issues with the auto import

examples/templates/kubernetes/main.tf Show resolved Hide resolved
@ammario ammario added this to the EE milestone Aug 22, 2022
@deansheather
Copy link
Member Author

deansheather commented Aug 22, 2022

@ammario added this to the EE milestone

Does this mean you want this to be an enterprise only feature? Right now it's licensed AGPL...

@bpmct
Copy link
Collaborator

bpmct commented Aug 22, 2022

@deansheather nope, this one will be free to start. EE represents both free and paid features.

Copy link
Collaborator

@bpmct bpmct left a comment

ran into an issue with the helm chart

Error: UPGRADE FAILED: error validating "": error validating data: ValidationError(Deployment.spec): unknown field "serviceAccountName" in io.k8s.api.apps.v1.DeploymentSpec

auto-import worked well, haven't been able to create a workspace yet though

@deansheather
Copy link
Member Author

deansheather commented Aug 25, 2022

@bpmct works now!
image
image

@deansheather deansheather marked this pull request as ready for review Aug 25, 2022
@deansheather deansheather requested a review from ammario as a code owner Aug 25, 2022
@deansheather deansheather requested a review from f0ssel Aug 25, 2022
f0ssel
f0ssel approved these changes Aug 25, 2022
@deansheather deansheather merged commit 14a9576 into main Aug 25, 2022
20 checks passed
@deansheather deansheather deleted the k8s-auto-import branch Aug 25, 2022
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.

4 participants