Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
This adds all the endpoints for basic k8s support, including running, starting, stopping, and removing repositories. With this, the only things that aren't supported are push/pull (all server side) and clone (CLI and server-side).
In the k8s world, we create a StatefulSet with a matching Service for each repository. For now, our port forwarding is somewhat janky as we just run kubectl in the background and cross our fingers. We will leave full-featured port forwarding to post-alpha. One difference to note vs. docker is that we persist the disablePortForwarding setting in the repo metadata, as we need to reference it on start/stop/checkout.
Testing
mvn install
. Geting started endtoend tests. Ran through run/commit/checkout/stop/start/rm workflow on both digital ocean and EC2. Disabled port mapping and made sure port forwarding wasn't started. Set environment variables and verified they propagated to pods.Native image support for k8s is not quite working due to some limitations in the kubernetes java client. PRs have been submitted and accepted, but we will likely need to build a custom version until the 7.0.0 release is shipped. For now I've left it broken, since we're still pre-alpha. Non-k8s titan works just fine (as demonstrated by e2e tests).