Skip to content

Auto import kubernetes template in Helm charts #3550

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 8 commits into from
Aug 25, 2022
Merged

Conversation

deansheather
Copy link
Member

  • 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
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.

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

@ammario ammario added this to the EE milestone Aug 22, 2022
@deansheather
Copy link
Member Author

@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
Member

bpmct commented Aug 22, 2022

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

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.

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

@bpmct works now!
image
image

@deansheather deansheather marked this pull request as ready for review August 25, 2022 19:03
@deansheather deansheather requested a review from ammario as a code owner August 25, 2022 19:03
@deansheather deansheather requested a review from f0ssel August 25, 2022 19:03
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.

Automatically import Kubernetes template when installing with Helm
4 participants