forked from kubernetes/kube-state-metrics
-
Notifications
You must be signed in to change notification settings - Fork 0
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 kubernetes#1 from brancz/openshift-origin-base
Rebase container image on openshift/origin-base
- Loading branch information
Showing
3 changed files
with
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
* | ||
!kube-state-metrics | ||
kube-state-metrics |
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,9 +1,21 @@ | ||
FROM scratch | ||
FROM openshift/origin-base | ||
|
||
COPY kube-state-metrics / | ||
VOLUME /tmp | ||
ENV GOPATH /go | ||
RUN mkdir $GOPATH | ||
|
||
ENTRYPOINT ["/kube-state-metrics", "--port=8080", "--telemetry-port=8081"] | ||
COPY . $GOPATH/src/k8s.io/kube-state-metrics | ||
|
||
EXPOSE 8080 | ||
EXPOSE 8081 | ||
RUN yum install -y golang make git && \ | ||
cd $GOPATH/src/k8s.io/kube-state-metrics && cat Makefile && \ | ||
make build && cp $GOPATH/src/k8s.io/kube-state-metrics/kube-state-metrics /usr/bin/ && \ | ||
yum erase -y golang make && yum clean all | ||
|
||
LABEL io.k8s.display-name="kube-state-metrics" \ | ||
io.k8s.description="This is a component that exposes metrics about Kubernetes objects." \ | ||
io.openshift.tags="kubernetes" \ | ||
maintainer="Frederic Branczyk <fbranczy@redhat.com>" | ||
|
||
# doesn't require a root user. | ||
USER 1001 | ||
|
||
ENTRYPOINT ["/usr/bin/kube-state-metrics"] |
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