-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from kthcloud/23-gpu-booking
Add Dockerfiles for GPU Booking Pod Terminator and Admission Controller; update GPU booking template and enhance KUBECONFIG handling in MAIA scripts
- Loading branch information
Showing
12 changed files
with
555 additions
and
9 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
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,33 @@ | ||
# Use a minimal Go image for building | ||
FROM golang:1.23 AS builder | ||
|
||
# Set working directory inside the container | ||
WORKDIR /app | ||
|
||
# Copy Go module files and download dependencies | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
# Copy the webhook source code | ||
COPY webhook.go ./ | ||
|
||
# Build the webhook server binary | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o webhook webhook.go | ||
|
||
# Use a minimal base image for the final container | ||
FROM alpine:latest | ||
|
||
WORKDIR /root/ | ||
|
||
# Copy the compiled binary | ||
COPY --from=builder /app/webhook . | ||
|
||
# Copy TLS certificates (Ensure they are generated beforehand) | ||
#COPY certs/tls.crt /etc/webhook/tls.crt | ||
#COPY certs/tls.key /etc/webhook/tls.key | ||
|
||
# Expose the webhook port | ||
EXPOSE 443 | ||
|
||
# Run the webhook server | ||
CMD ["/root/webhook", "--tls-cert=/tls/tls.crt", "--tls-key=/tls/tls.key"] |
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,28 @@ | ||
module webhook.go | ||
|
||
go 1.23.0 | ||
|
||
toolchain go1.23.6 | ||
|
||
require k8s.io/api v0.32.1 | ||
|
||
require ( | ||
github.com/fxamacker/cbor/v2 v2.7.0 // indirect | ||
github.com/go-logr/logr v1.4.2 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/x448/float16 v0.8.4 // indirect | ||
golang.org/x/net v0.30.0 // indirect | ||
golang.org/x/text v0.19.0 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
k8s.io/apimachinery v0.32.1 // indirect | ||
k8s.io/klog/v2 v2.130.1 // indirect | ||
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect | ||
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect | ||
sigs.k8s.io/yaml v1.4.0 // indirect | ||
) |
Oops, something went wrong.