Skip to content

Auto import kubernetes template in Helm charts - #3550

Merged
deansheather merged 8 commits into
mainfrom
k8s-auto-import
Aug 25, 2022
Merged

deansheather merged 8 commits into
mainfrom
k8s-auto-import

Conversation

@deansheather

Copy link
Copy Markdown
Collaborator
  • 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

Comment thread examples/templates/kubernetes/main.tf Resolved
Comment thread examples/templates/kubernetes/main.tf Resolved

@bpmct bpmct left a comment •

Copy link
Copy Markdown
Member

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

Comment thread examples/templates/kubernetes/main.tf Resolved
@ammario ammario added this to the EE milestone Aug 22, 2022
@deansheather

Copy link
Copy Markdown
Collaborator 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

bpmct commented Aug 22, 2022

Copy link
Copy Markdown
Member

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

@bpmct bpmct left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator 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