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

Add support for Kubernetes #146

Merged
merged 1 commit into from Mar 18, 2019

Conversation

Projects
None yet
8 participants
@stevesloka
Copy link
Contributor

stevesloka commented Mar 8, 2019

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 slokas@vmware.com

Is there an open issue you can link to?

#60

// cc @jbeda

@stevesloka stevesloka requested review from code-asher , kylecarbs and nhooyr as code owners Mar 8, 2019

@kylecarbs kylecarbs removed request for kylecarbs and code-asher Mar 8, 2019

@NGTmeaty

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor Author

stevesloka commented Mar 8, 2019

@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

This comment has been minimized.

Copy link

NGTmeaty commented Mar 8, 2019

Awesome! +1

@bhack

This comment has been minimized.

Copy link

bhack commented Mar 8, 2019

It could be nice to have an official helm chart.

@sr229

This comment has been minimized.

Copy link

sr229 commented Mar 9, 2019

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

@stevesloka

This comment has been minimized.

Copy link
Contributor Author

stevesloka commented Mar 9, 2019

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

@stevesloka

This comment has been minimized.

Copy link
Contributor Author

stevesloka commented Mar 9, 2019

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

@kylecarbs

kylecarbs Mar 9, 2019

Member

Not sure we should change the base image

This comment has been minimized.

@stevesloka

stevesloka Mar 10, 2019

Author Contributor

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.

This comment has been minimized.

@kylecarbs

kylecarbs Mar 10, 2019

Member

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

...

This comment has been minimized.

@Zate

Zate Mar 13, 2019

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.

Show resolved Hide resolved deployment/deployment.yaml Outdated

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

@PhilsLab

This comment has been minimized.

Copy link
Contributor

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 force-pushed the stevesloka:addk8s branch from 2349305 to 9faecc5 Mar 12, 2019

@stevesloka stevesloka changed the title WIP: Add support for Kubernetes Add support for Kubernetes Mar 12, 2019

@stevesloka

This comment has been minimized.

Copy link
Contributor Author

stevesloka commented Mar 12, 2019

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.

Add support for Kubernetes by deploying code-server. Also includes AWS
example which persists data to a Persistent Volume / Claim.

Signed-off-by: Steve Sloka <slokas@vmware.com>

@stevesloka stevesloka force-pushed the stevesloka:addk8s branch from 9faecc5 to 9c2f8c7 Mar 12, 2019

@kylecarbs

This comment has been minimized.

Copy link
Member

kylecarbs commented Mar 14, 2019

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

@nhooyr

nhooyr approved these changes Mar 14, 2019

Copy link
Collaborator

nhooyr left a comment

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

@stevesloka

This comment has been minimized.

Copy link
Contributor Author

stevesloka commented Mar 15, 2019

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

@nhooyr

This comment has been minimized.

Copy link
Collaborator

nhooyr commented Mar 15, 2019

Awesome, sounds good man.

@nhooyr

This comment has been minimized.

Copy link
Collaborator

nhooyr commented Mar 15, 2019

@kylecarbs can you disable the signed commits requirement?

@kylecarbs kylecarbs merged commit 6028a8b into codercom:master Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.