Skip to content

Add support for Kubernetes #146

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
Mar 18, 2019
Merged

Add support for Kubernetes #146

merged 1 commit into from
Mar 18, 2019

Conversation

stevesloka
Copy link
Contributor

Describe in detail the problem you had and how this PR fixes it

Fixes #60 by adding support for Kubernetes. This deploys code-server, Contour for ingress controller, and Cert Manager for Let's Encrypt certificates, with persistent storage with AWS EBS volumes. Also, I left the Dockerfile I used for golang development. If there's a public push of this somewhere it would be great to document how you can create base images with the right tooling up front.

This is also somewhat opiononated in that it's using AWS EBS volumes, but can be adapted for many use cases. I wasn't sure how that might get organized within the repo.

Signed-off-by: Steve Sloka [email protected]

Is there an open issue you can link to?

#60

// cc @jbeda

@NGTmeaty
Copy link
Contributor

NGTmeaty commented Mar 8, 2019

This looks awesome! I wonder if it could be improved by possibly integrating or using parts of our current Dockerfile as we currently do some building?

@stevesloka
Copy link
Contributor Author

@NGTmeaty Sounds good! I just updated to use the example Dockerfile. I should probably add some docs to this as well. Let me see if I can pull those together so it's more clear to folks.

@NGTmeaty
Copy link
Contributor

NGTmeaty commented Mar 8, 2019

Awesome! +1

@bhack
Copy link

bhack commented Mar 8, 2019

It could be nice to have an official helm chart.

@sr229
Copy link
Contributor

sr229 commented Mar 9, 2019

Please do not rely on EBS only, make it vendor agnostic

@stevesloka
Copy link
Contributor Author

It doesn't, just an example. You could reference any storage class and it would work.

@stevesloka
Copy link
Contributor Author

I could integrate kustomize to allow for customization. Could pick some clouds and show examples (e.g. AWS, GCP, Azure). What would you suggest?

@sr229
Copy link
Contributor

sr229 commented Mar 9, 2019

@stevesloka since its an example, might as well use default storage class for PVC or hostMount, then have providers documented if they want to

# directly which should be fast as it is slow because it populates its own cache every time.
RUN yarn && yarn task build:server:binary

# Use golang base dev for go development tooling
Copy link
Member

Choose a reason for hiding this comment

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

Not sure we should change the base image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll leave it generic. My intent was to show how to have bootstrapped images. Having to install deps is not great, but doesn't make sense at this point in time.

Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of extending it.

We could include an example of something like:

FROM codercom/code-server

RUN apt-get install mysql -y

...

Copy link

Choose a reason for hiding this comment

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

Any desire to move it to 1804. LTS for the base instead of 18.10 ? Generally prefer to build docker images on things that have longer support.

@stevesloka stevesloka changed the title Add support for Kubernetes WIP: Add support for Kubernetes Mar 10, 2019
@PhilsLab
Copy link

PhilsLab commented Mar 11, 2019

I think the ingress controller and TLS should not be part of this. Depending on the cluster setup, those are unwanted extras in most cases.
Maybe adding an ingress object for nginx-ingress might be favored, as it is the most commonly deployed one.

@stevesloka stevesloka changed the title WIP: Add support for Kubernetes Add support for Kubernetes Mar 12, 2019
@stevesloka
Copy link
Contributor Author

I just dropped all the ingress and cert-manager stuff. I left the AWS reference, can also delete that, but might help someone in that environment. I didn't integrate local pvcs since you need to turn on a feature flag to enable and probably wouldn't work in most environments.

example which persists data to a Persistent Volume / Claim.

Signed-off-by: Steve Sloka <[email protected]>
@kylecarbs
Copy link
Member

Is this ready to go? Happy to merge this in.

Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

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

seems reasonable, would be nice to have some docs later.

@stevesloka
Copy link
Contributor Author

@nhooyr I can add some docs on a follow-up PR.

@nhooyr
Copy link
Contributor

nhooyr commented Mar 15, 2019

Awesome, sounds good man.

@nhooyr
Copy link
Contributor

nhooyr commented Mar 15, 2019

@kylecarbs can you disable the signed commits requirement?

@kylecarbs kylecarbs merged commit 6028a8b into coder:master Mar 18, 2019
code-asher pushed a commit that referenced this pull request Jun 19, 2019
#146)

example which persists data to a Persistent Volume / Claim.

Signed-off-by: Steve Sloka <[email protected]>
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.

Kubernetes Support
8 participants