-
Notifications
You must be signed in to change notification settings - Fork 0
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
kubernetes support v0 #2
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DominicBurkart
force-pushed
the
master
branch
from
September 29, 2020 13:31
fdc2c7b
to
9229d22
Compare
DominicBurkart
force-pushed
the
kubernetes
branch
10 times, most recently
from
October 6, 2020 14:21
3bc51b5
to
483e962
Compare
DominicBurkart
force-pushed
the
kubernetes
branch
18 times, most recently
from
October 14, 2020 09:07
5ba894c
to
54161c4
Compare
DominicBurkart
force-pushed
the
kubernetes
branch
from
June 12, 2021 18:14
b673165
to
933535f
Compare
DominicBurkart
force-pushed
the
kubernetes
branch
from
June 12, 2021 18:20
933535f
to
a0adf3f
Compare
This reverts commit b2ee4b0.
This is the worst PR I have ever written, but I'm happy with where the code is now vs when it was opened! May [git] history be my judge. |
note: does not delete local docker image, or docker image in cluster
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✨ 🛰️ 🤖 ☸️ kubernetes support ☸️ 🤖 🛰️ ✨
Aside from implementing k8s support, this PR changes some of the main abstractions and better defines roles in the test suite. Full description below.
k8s support example
k8s support technical overview
distributed
feature flag, a docker file for each microservice is generated at compile time on the host machine. This file contains the extracted function source code embedded as a tar. The file is then embedded directly into the output binary. FEATURE SHIFT: because the tar can be really big, it doesn't make sense to try to pipe it directly to docker build viaecho '[docker file contents]' | docker build -t [function name] -
(there are pipe errors and weird shell errors about the maximum allowed size of literals / vars). To avoid these issues, I just make a regular directory that contains the tar and dockerfile, and then delete it later.declare
is run (once), the main program connects to the cluster. The main program starts a local registry from the docker registry image, and tags each microservice image in the registry (todo: how do all nodes in the cluster get access to this registry?). The main program submits a pod with the relevant image to the cluster and records its address and port.dispatch
is run (each time the target function is called), the main program makes an http request to the relevant pod and awaits the response.testing
k8s support is tested using a new example project that runs in CI using a minimal microk8s setup.
other changes
declare
onDistributionPlatform
trait async. This is nice because the network request to connect to a cluster may take some time, so having a non-blocking API here will be useful for any clients with an async environment. This will also be useful for any other distributed platforms. Sincedeclare
was already async and theon
macro already handles the async environment fordeclare
, this doesn't change much for end users. 5b1f407--features "distributed"
silently built local version. 0682c58 (secondary bugs: 40fcbd2)--release
or not to determine if microservices should be built with--release
or not. caa1a09next steps
K8s::from_config
function or similar)declare
is allowed to return.