-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sample project memcached-api-server
- Loading branch information
1 parent
b8eff8f
commit 138bb01
Showing
22 changed files
with
1,438 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Instructions to install API using the installer | ||
# Build and test the controller-manager | ||
FROM golang:1.9.3 as builder | ||
|
||
ENV TEST_ASSET_DIR /usr/local/bin | ||
ENV TEST_ASSET_KUBECTL $TEST_ASSET_DIR/kubectl | ||
ENV TEST_ASSET_KUBE_APISERVER $TEST_ASSET_DIR/kube-apiserver | ||
ENV TEST_ASSET_ETCD $TEST_ASSET_DIR/etcd | ||
|
||
# Download test framework binaries | ||
ENV TEST_ASSET_URL https://storage.googleapis.com/k8s-c10s-test-binaries | ||
RUN curl ${TEST_ASSET_URL}/etcd-Linux-x86_64 --output $TEST_ASSET_ETCD | ||
RUN curl ${TEST_ASSET_URL}/kube-apiserver-Linux-x86_64 --output $TEST_ASSET_KUBE_APISERVER | ||
RUN curl https://storage.googleapis.com/kubernetes-release/release/v1.9.2/bin/linux/amd64/kubectl --output $TEST_ASSET_KUBECTL | ||
RUN chmod +x $TEST_ASSET_ETCD | ||
RUN chmod +x $TEST_ASSET_KUBE_APISERVER | ||
RUN chmod +x $TEST_ASSET_KUBECTL | ||
|
||
# Copy in the go src | ||
WORKDIR /go/src/github.com/kubernetes-sigs/kubebuilder/samples/memcached-api-server | ||
COPY pkg/ pkg/ | ||
COPY cmd/ cmd/ | ||
COPY vendor/ vendor/ | ||
|
||
# Build and test the API code | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o controller-manager ./cmd/controller-manager/main.go | ||
RUN go test ./pkg/... ./cmd/... | ||
|
||
# Copy the controller-manager into a thin image | ||
FROM scratch | ||
# RUN apk --no-cache add ca-certificates | ||
WORKDIR /root/ | ||
COPY --from=builder /go/src/github.com/kubernetes-sigs/kubebuilder/samples/memcached-api-server/controller-manager . | ||
ENTRYPOINT ["./controller-manager"] | ||
CMD ["--install-crds=false"] |
Oops, something went wrong.