forked from ExpediaGroup/kubernetes-sidecar-injector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (28 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SHELL := /bin/bash
CONTAINER_NAME=expediagroup/kubernetes-sidecar-injector
IMAGE_TAG?=$(shell git rev-parse HEAD)
KIND_CLUSTER?=cluster1
SRC=$(shell find . -type f -name '*.go' -not -path "./vendor/*")
lint:
go list ./... | xargs golint -min_confidence 1.0
vet:
go vet ./...
imports:
goimports -w ${SRC}
clean:
go clean
build: clean vet lint
go build -o kubernetes-sidecar-injector
release: clean vet lint
CGO_ENABLED=0 GOOS=linux go build -o kubernetes-sidecar-injector
docker:
docker build --no-cache -t ${CONTAINER_NAME}:${IMAGE_TAG} .
kind-load: docker
kind load docker-image ${CONTAINER_NAME}:${IMAGE_TAG} --name ${KIND_CLUSTER}
helm-install:
helm upgrade -i kubernetes-sidecar-injector ./charts/kubernetes-sidecar-injector/. --namespace=kubernetes-sidecar-injector --create-namespace --set image.tag=${IMAGE_TAG}
kind-install: kind-load helm-install
install-sample-container:
helm upgrade -i inject-container ./sample/chart/echo-server/. --namespace=sample --create-namespace
install-sample-init-container:
helm upgrade -i inject-init-container ./sample/chart/nginx/. --namespace=sample --create-namespace