mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-02-28 16:50:19 +00:00
43 lines
1.4 KiB
Makefile
43 lines
1.4 KiB
Makefile
# Copyright 2016 The Kubernetes Authors All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# Makefile for the Docker image gcr.io/google_containers/kube-nethealth-<ARCH>
|
|
# MAINTAINER: Girish kalele <abshah@google.com>
|
|
# If you update this image please bump the tag value before pushing.
|
|
#
|
|
# Usage:
|
|
# [TAG=1.0] [REGISTRY=gcr.io/google_containers] make push
|
|
|
|
# Default registry, arch and tag. This can be overwritten by arguments to make
|
|
TAG?=1.0
|
|
REGISTRY?=gcr.io/google_containers
|
|
ARCH?=amd64
|
|
|
|
all: build
|
|
|
|
nethealth: nethealth.go
|
|
CGO_ENABLED=0 go build -ldflags '-s' -v -o nethealth nethealth.go
|
|
|
|
build: nethealth
|
|
docker build -t $(REGISTRY)/kube-nethealth-$(ARCH):$(TAG) .
|
|
|
|
push: build
|
|
ifeq ($(REGISTRY),gcr.io/google_containers)
|
|
gcloud docker push $(REGISTRY)/kube-nethealth-$(ARCH):$(TAG)
|
|
else
|
|
docker push $(REGISTRY)/kube-nethealth-$(ARCH):$(TAG)
|
|
endif
|
|
|
|
.PHONY: push
|