Skip to content

Commit b687dfa

Browse files
author
Girish Kalele
committed
Containerize the nethealth bandwidth measurement utility
1 parent 33a4354 commit b687dfa

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

pkg/util/nethealth/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2016 The Kubernetes Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM busybox
16+
MAINTAINER Girish Kalele <[email protected]>
17+
COPY nethealth /usr/bin/
18+
ENTRYPOINT ["/usr/bin/nethealth"]

pkg/util/nethealth/Makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright 2016 The Kubernetes Authors All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Makefile for the Docker image gcr.io/google_containers/kube-nethealth-<ARCH>
16+
# MAINTAINER: Girish kalele <[email protected]>
17+
# If you update this image please bump the tag value before pushing.
18+
#
19+
# Usage:
20+
# [TAG=1.0] [REGISTRY=gcr.io/google_containers] make push
21+
22+
# Default registry, arch and tag. This can be overwritten by arguments to make
23+
TAG?=1.0
24+
REGISTRY?=gcr.io/google_containers
25+
ARCH?=amd64
26+
27+
all: build
28+
29+
nethealth: nethealth.go
30+
CGO_ENABLED=0 go build -ldflags '-s' -v -o nethealth nethealth.go
31+
32+
build: nethealth
33+
docker build -t $(REGISTRY)/kube-nethealth-$(ARCH):$(TAG) .
34+
35+
push: build
36+
ifeq ($(REGISTRY),gcr.io/google_containers)
37+
gcloud docker push $(REGISTRY)/kube-nethealth-$(ARCH):$(TAG)
38+
else
39+
docker push $(REGISTRY)/kube-nethealth-$(ARCH):$(TAG)
40+
endif
41+
42+
.PHONY: push

0 commit comments

Comments
 (0)