Skip to content

RFC: Git-backed templates #2958

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

Closed
ammario opened this issue Jul 13, 2022 · 8 comments
Closed

RFC: Git-backed templates #2958

ammario opened this issue Jul 13, 2022 · 8 comments
Assignees
Labels
stale This issue is like stale bread.

Comments

@ammario
Copy link
Member

ammario commented Jul 13, 2022

See problem statement in #2950

If I could set a template as backed by a git ref, change management is dead simple. Iteration shouldn't suffer as template update is replaced by git push.

CI automation (e.g pushing a Docker image with each template) also becomes simpler.

We should do the "Open in Coder" button alongside this as well. Keep in mind that this button should support specifying a path within the repository, as multiple templates can coexist in one repo.

@bpmct bpmct self-assigned this Jul 13, 2022
@ammario ammario changed the title Add VCS-backed template Add Git-backed template Jul 14, 2022
@ammario ammario changed the title Add Git-backed template Git-backed templates Jul 14, 2022
This was referenced Jul 14, 2022
@ketang
Copy link
Contributor

ketang commented Jul 14, 2022

Our VCS support should allow multiple URLs for the same template and create a union of all files. That allows them to have separate governance for individual subsets of files, for instance to more tightly limit who has access to sensitive data contained in one file.

@ammario
Copy link
Member Author

ammario commented Jul 14, 2022

So, our whole model becomes more complex when we assume that sensitive data will be in both the templates and the provisioner environment. See our recommended approach to secrets here.

Most git providers support CODEOWNERS so they can finely control edit access in the repo without us adding an additional feature.

@ketang
Copy link
Contributor

ketang commented Jul 14, 2022

our whole model becomes more complex when we assume that sensitive data will be in both the templates and the provisioner environment

Yeah. I'm not expressing a preference. I'm just predicting what customers will want.

Also, there are different kinds of sensitive data that may appear in templates. It's not just authentication secrets.

@ketang
Copy link
Contributor

ketang commented Jul 14, 2022

Especially could be a concern interfacing with legacy systems that aren't compatible with more modern auth*.

@sreya
Copy link
Collaborator

sreya commented Jul 14, 2022

I really like the idea of git-backed templates since I think that's the way that most people that are seriously using the product are going to want to source-control their workspace configuration. Some thoughts on how this would be implemented:

  • Are we introducing a new template "type" or are we doing away with our current model of coderd hosting the template archives? Eliminating the current model is the simplest way but it is backwards breaking (although I don't think we should care about this that much this early into the project).

  • Only git-backed templates also makes the initial experience more arduous. Right now a user downloads coderd, runs like 3 commands, and they have a workspace. If we move to purely git and a user needs to make some minor changes to our base templates, then they have to setup an oauth app or github/gitlab/bitbucket app (GitHub specifically is deprecating OAuth apps I'm pretty sure) in order for coderd to pull the template correctly. That's a lot of work to just check out the product.

  • If we introduce a new concept of "git templates" to sit alongside "local templates", then we have the added cognitive overhead of having to think through both flows whenever we want to make a change to templates. Commands like coder template push/pull also become conditional based on the template. Does template push/pull no-op for git-backed templates since it's all done via git?

It's worth mentioning that people can use git right now to version control their templates. Their CI would just run templates update or whatever. Obviously this still allows a user to potentially accidentally overwrite the wrong template, but maybe if we have finer-grained RBAC we can recommend that customers remove that permission for all users except whatever service account their CI is using.

@ammario
Copy link
Member Author

ammario commented Jul 15, 2022

@sreya all good concerns — perhaps we should resolve #2987 before this one?

@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 25, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2022
@bpmct bpmct reopened this Dec 6, 2022
@github-actions github-actions bot removed the stale This issue is like stale bread. label Dec 7, 2022
@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Apr 12, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue is like stale bread.
Projects
None yet
Development

No branches or pull requests

5 participants