From b62dfb98981b632883399094ee6a7d8d2e92d2d1 Mon Sep 17 00:00:00 2001 From: Adam Reese <adam@reese.io> Date: Thu, 12 Apr 2018 15:36:54 -0700 Subject: [PATCH] remove tiller build infra --- Makefile | 25 ++----------------------- rootfs/Dockerfile | 26 -------------------------- rootfs/README.md | 27 --------------------------- versioning.mk | 27 --------------------------- 4 files changed, 2 insertions(+), 103 deletions(-) delete mode 100644 rootfs/Dockerfile delete mode 100644 rootfs/README.md diff --git a/Makefile b/Makefile index 4dd5f2d95..fca7587a9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,3 @@ -DOCKER_REGISTRY ?= gcr.io -IMAGE_PREFIX ?= kubernetes-helm -SHORT_NAME ?= tiller TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le windows/amd64 DIST_DIRS = find * -type d -exec APP = helm @@ -14,7 +11,7 @@ TESTFLAGS := LDFLAGS := -w -s GOFLAGS := BINDIR := $(CURDIR)/bin -BINARIES := helm tiller +BINARIES := helm # Required for globs to work correctly SHELL=/bin/bash @@ -48,24 +45,6 @@ checksum: shasum -a 256 "$${f}" | awk '{print $$1}' > "$${f}.sha256" ; \ done -.PHONY: check-docker -check-docker: - @if [ -z $$(which docker) ]; then \ - echo "Missing \`docker\` client which is required for development"; \ - exit 2; \ - fi - -.PHONY: docker-binary -docker-binary: BINDIR = ./rootfs -docker-binary: GOFLAGS += -a -installsuffix cgo -docker-binary: - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(GO) build -o $(BINDIR)/tiller $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/tiller - -.PHONY: docker-build -docker-build: check-docker docker-binary - docker build --rm -t ${IMAGE} rootfs - docker tag ${IMAGE} ${MUTABLE_IMAGE} - .PHONY: test test: build test: TESTFLAGS += -race -v @@ -97,7 +76,7 @@ verify-docs: build .PHONY: clean clean: - @rm -rf $(BINDIR) ./rootfs/tiller ./_dist + @rm -rf $(BINDIR) ./_dist .PHONY: coverage coverage: diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile deleted file mode 100644 index 53757cd8d..000000000 --- a/rootfs/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2016 The Kubernetes Authors. -# -# 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. - -FROM alpine:3.3 - -RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* - -ENV HOME /tmp - -COPY tiller /tiller - -EXPOSE 44134 - -CMD ["/tiller"] - diff --git a/rootfs/README.md b/rootfs/README.md deleted file mode 100644 index cf8b2e61e..000000000 --- a/rootfs/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# RootFS - -This directory stores all files that should be copied to the rootfs of a -Docker container. The files should be stored according to the correct -directory structure of the destination container. For example: - -``` -rootfs/bin -> /bin -rootfs/usr/local/share -> /usr/local/share -``` - -## Dockerfile - -A Dockerfile in the rootfs is used to build the image. Where possible, -compilation should not be done in this Dockerfile, since we are -interested in deploying the smallest possible images. - -Example: - -```Dockerfile -FROM alpine:3.2 - -COPY . / - -ENTRYPOINT ["/usr/local/bin/boot"] -``` - diff --git a/versioning.mk b/versioning.mk index d749ffce2..b8350ea63 100644 --- a/versioning.mk +++ b/versioning.mk @@ -1,16 +1,12 @@ -MUTABLE_VERSION := canary - GIT_COMMIT = $(shell git rev-parse HEAD) GIT_SHA = $(shell git rev-parse --short HEAD) GIT_TAG = $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null) GIT_DIRTY = $(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean") ifdef VERSION - DOCKER_VERSION = $(VERSION) BINARY_VERSION = $(VERSION) endif -DOCKER_VERSION ?= git-${GIT_SHA} BINARY_VERSION ?= ${GIT_TAG} # Only set Version if building a tag or VERSION is set @@ -25,31 +21,8 @@ endif LDFLAGS += -X k8s.io/helm/pkg/version.GitCommit=${GIT_COMMIT} LDFLAGS += -X k8s.io/helm/pkg/version.GitTreeState=${GIT_DIRTY} -IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${DOCKER_VERSION} -MUTABLE_IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION} - -DOCKER_PUSH = docker push -ifeq ($(DOCKER_REGISTRY),gcr.io) - DOCKER_PUSH = gcloud docker push -endif - info: @echo "Version: ${VERSION}" @echo "Git Tag: ${GIT_TAG}" @echo "Git Commit: ${GIT_COMMIT}" @echo "Git Tree State: ${GIT_DIRTY}" - @echo "Docker Version: ${DOCKER_VERSION}" - @echo "Registry: ${DOCKER_REGISTRY}" - @echo "Immutable Image: ${IMAGE}" - @echo "Mutable Image: ${MUTABLE_IMAGE}" - -.PHONY: docker-push -docker-push: docker-mutable-push docker-immutable-push - -.PHONY: docker-immutable-push -docker-immutable-push: - ${DOCKER_PUSH} ${IMAGE} - -.PHONY: docker-mutable-push -docker-mutable-push: - ${DOCKER_PUSH} ${MUTABLE_IMAGE} -- GitLab