-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MM-51801] Cloud native support (#34)
* [MM-52322] Support multiple APIs implementations (#23) * JobService interface * Bump build deps * [MM-52323] Refactor docker implementation (#24) * Refactor docker job service * Add tests * Build and release docker image (#25) * [MM-52346] Kubernetes implementation (#26) * Setup k8s client * Implement k8s API * Remove StopJob * Implement Init() API call * Setup k8s CI * Update sample config * Add local k8s development doc * Use human friendly prefix for job names * Add support for passing custom tolerations * Expose version info (#28) * Implement unauthorized client error (#27) * Update k8s client deps to latest * Decouple public packages (#32) * Enforce MaxConcurrentJobs limit (#33) * Bump calls-recorder * Update dev docs * Explicitly set image pulling policy * Support fetching dev builds from calls-recorder-daily registry
- Loading branch information
1 parent
a8b8de3
commit 6daa13a
Showing
35 changed files
with
1,856 additions
and
636 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This dockerfile is used to build Mattermost rtcd | ||
# A multi stage build, with golang used as a builder | ||
# and gcr.io/distroless/static as runner | ||
ARG GO_IMAGE=golang:1.19.8@sha256:dd9ad81920b63c7f9f18823d888d5fdcc7e7516086fd16654d07bc437f0e2427 | ||
# hadolint ignore=DL3006 | ||
FROM ${GO_IMAGE} as builder | ||
|
||
#GO_BUILD_PLATFORMS holds the platforms that we will build the docker image against | ||
ARG GO_BUILD_PLATFORMS=linux-amd64 | ||
|
||
# Setup directories structure and compile | ||
COPY . /src | ||
WORKDIR /src | ||
RUN make go-build | ||
|
||
# Shrink final image since we only need the rtcd binary | ||
# and use distroless container image as runner for security | ||
FROM gcr.io/distroless/static@sha256:d6fa9db9548b5772860fecddb11d84f9ebd7e0321c0cb3c02870402680cc315f as runner | ||
COPY --from=builder /src/dist/calls-offloader-linux-amd64 /opt/calls-offloader/bin/calls-offloader | ||
|
||
# Create and use unprivileged user to run the service | ||
COPY ./build/group ./build/passwd /etc/ | ||
|
||
USER calls | ||
|
||
WORKDIR /opt/calls-offloader/bin | ||
ENTRYPOINT ["./calls-offloader"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
root:x:0: | ||
calls:x:65532: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
root:x:0:0:root:/root:/sbin/nologin | ||
calls:x:65532:65532:calls:/home/calls:/sbin/nologin |
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
Oops, something went wrong.