Skip to content

Commit c67ca94

Browse files
author
Phillip Wittrock
authored
Merge pull request #19 from pwittrock/master
Full samplecontroller example
2 parents a52d0ee + 5dbb53f commit c67ca94

File tree

7,587 files changed

+2245137
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,587 files changed

+2245137
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Instructions to install API using the installer
2+
# Build and test the controller-manager
3+
FROM golang:1.9.3 as builder
4+
5+
ENV TEST_ASSET_DIR /usr/local/bin
6+
ENV TEST_ASSET_KUBECTL $TEST_ASSET_DIR/kubectl
7+
ENV TEST_ASSET_KUBE_APISERVER $TEST_ASSET_DIR/kube-apiserver
8+
ENV TEST_ASSET_ETCD $TEST_ASSET_DIR/etcd
9+
10+
# Download test framework binaries
11+
ENV TEST_ASSET_URL https://storage.googleapis.com/k8s-c10s-test-binaries
12+
RUN curl ${TEST_ASSET_URL}/etcd-Linux-x86_64 --output $TEST_ASSET_ETCD
13+
RUN curl ${TEST_ASSET_URL}/kube-apiserver-Linux-x86_64 --output $TEST_ASSET_KUBE_APISERVER
14+
RUN curl https://storage.googleapis.com/kubernetes-release/release/v1.9.2/bin/linux/amd64/kubectl --output $TEST_ASSET_KUBECTL
15+
RUN chmod +x $TEST_ASSET_ETCD
16+
RUN chmod +x $TEST_ASSET_KUBE_APISERVER
17+
RUN chmod +x $TEST_ASSET_KUBECTL
18+
19+
# Copy in the go src
20+
WORKDIR /go/src/samplecontroller
21+
COPY pkg/ pkg/
22+
COPY cmd/ cmd/
23+
COPY vendor/ vendor/
24+
25+
# Build and test the API code
26+
RUN go build -a -o controller-manager ./cmd/controller-manager/main.go
27+
RUN go test ./pkg/... ./cmd/...
28+
29+
# Copy the controller-manager into a thin image
30+
FROM ubuntu:latest
31+
# RUN apk --no-cache add ca-certificates
32+
WORKDIR /root/
33+
COPY --from=builder /go/src/samplecontroller/controller-manager .
34+
CMD ["./controller-manager", "--install-crds=false"]

0 commit comments

Comments
 (0)