Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable dynamic creation for admission hooks and update dependencies (#…
…1450) * Update all dependencies to the latest versions Add cert generator for the webhooks Add manifests for the webhooks * Modify Dockerfile for manager * Remove comments * Update Dockerfiles for Go images * Add signerName: kubernetes.io/kube-apiserver-client to csr Update roles for controller RBAC Changes after review * Fix not installed CRD error * Update scripts * Revert operator changes * Describe controller pod in test * Add log line to test * Move kubectl version * Change csr version to v1beta1 * Remove log * Change signerName to kubernetes.io/kubelet-serving * Modify common name Co-authored-by: Yuki Iwai <68272500+tenzen-y@users.noreply.github.com> * Add env variable to init container Co-authored-by: Yuki Iwai <68272500+tenzen-y@users.noreply.github.com> * Get namespace from env Co-authored-by: Yuki Iwai <68272500+tenzen-y@users.noreply.github.com> * Remove quotes * Remove spaces * Run cert generator script from the Job * Modify new ui Dockerfile * Disable Actions on PR * Modify setup Katib script * Fix PODNUM * Remove imagePullPolicy from PyTorch and TFJob examples * Disable Pytorch examples in e2e * Add sleep to e2e test * Activate Actions * Disable actions Co-authored-by: Yuki Iwai <68272500+tenzen-y@users.noreply.github.com>
- Loading branch information
1 parent
d9b4602
commit 12e7f1e
Showing
115 changed files
with
3,980 additions
and
2,512 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM alpine:3.12.0 | ||
|
||
ARG KUBECTL_VERSION="v1.19.3" | ||
|
||
# Fixes https://snyk.io/vuln/SNYK-LINUX-MUSL-458116 | ||
RUN apk upgrade musl | ||
|
||
RUN apk add --update openssl | ||
RUN wget https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl \ | ||
&& chmod +x ./kubectl && mv ./kubectl /usr/local/bin/kubectl | ||
|
||
COPY ./hack/cert-generator.sh /app/cert-generator.sh | ||
RUN chmod +x /app/cert-generator.sh | ||
|
||
WORKDIR /app | ||
|
||
ENTRYPOINT ["sh", "./cert-generator.sh"] |
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 |
---|---|---|
@@ -1,22 +1,28 @@ | ||
# Build the manager binary | ||
# Build the Katib controller. | ||
FROM golang:alpine AS build-env | ||
|
||
# Copy in the go src | ||
ADD . /go/src/github.com/kubeflow/katib | ||
WORKDIR /go/src/github.com/kubeflow/katib | ||
|
||
WORKDIR /go/src/github.com/kubeflow/katib/cmd/katib-controller | ||
# Build | ||
# Download packages. | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download -x | ||
|
||
# Copy sources. | ||
COPY cmd/ cmd/ | ||
COPY pkg/ pkg/ | ||
|
||
# Build the binary. | ||
RUN if [ "$(uname -m)" = "ppc64le" ]; then \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -a -o katib-controller ./v1beta1; \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -a -o katib-controller ./cmd/katib-controller/v1beta1; \ | ||
elif [ "$(uname -m)" = "aarch64" ]; then \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -o katib-controller ./v1beta1; \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -o katib-controller ./cmd/katib-controller/v1beta1; \ | ||
else \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o katib-controller ./v1beta1; \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o katib-controller ./cmd/katib-controller/v1beta1; \ | ||
fi | ||
# Copy the controller-manager into a thin image | ||
|
||
# Copy the controller-manager into a thin image. | ||
FROM alpine:3.7 | ||
WORKDIR /app | ||
RUN apk update && apk add ca-certificates | ||
COPY --from=build-env /go/src/github.com/kubeflow/katib/cmd/katib-controller/katib-controller . | ||
USER 1000 | ||
COPY --from=build-env /go/src/github.com/kubeflow/katib/katib-controller . | ||
ENTRYPOINT ["./katib-controller"] |
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
26 changes: 16 additions & 10 deletions
26
cmd/metricscollector/v1beta1/file-metricscollector/Dockerfile
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 |
---|---|---|
@@ -1,22 +1,28 @@ | ||
# Build the manager binary | ||
# Build the Katib file metrics collector. | ||
FROM golang:alpine AS build-env | ||
|
||
# Copy in the go src | ||
ADD . /go/src/github.com/kubeflow/katib | ||
WORKDIR /go/src/github.com/kubeflow/katib | ||
|
||
WORKDIR /go/src/github.com/kubeflow/katib/cmd/metricscollector/v1beta1/file-metricscollector/ | ||
# Download packages. | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download -x | ||
|
||
# Build | ||
# Copy sources. | ||
COPY cmd/ cmd/ | ||
COPY pkg/ pkg/ | ||
|
||
# Build the binary. | ||
RUN if [ "$(uname -m)" = "ppc64le" ]; then \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -a -o file-metricscollector ./; \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -a -o file-metricscollector ./cmd/metricscollector/v1beta1/file-metricscollector; \ | ||
elif [ "$(uname -m)" = "aarch64" ]; then \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -o file-metricscollector ./; \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -o file-metricscollector ./cmd/metricscollector/v1beta1/file-metricscollector; \ | ||
else \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o file-metricscollector ./; \ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o file-metricscollector ./cmd/metricscollector/v1beta1/file-metricscollector; \ | ||
fi | ||
|
||
# Copy the controller-manager into a thin image | ||
# Copy the file metrics collector into a thin image. | ||
FROM alpine:3.7 | ||
WORKDIR /app | ||
COPY --from=build-env /go/src/github.com/kubeflow/katib/cmd/metricscollector/v1beta1/file-metricscollector/file-metricscollector . | ||
COPY --from=build-env /go/src/github.com/kubeflow/katib/file-metricscollector . | ||
ENTRYPOINT ["./file-metricscollector"] |
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
Oops, something went wrong.