mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
edited kpt target
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
MYGOBIN := $(shell go env GOPATH)/bin
|
||||
GOPATH := $(shell go env GOPATH)
|
||||
export PATH := $(MYGOBIN):$(PATH)
|
||||
|
||||
.PHONY: generate license fix vet fmt test lint tidy openapi schema
|
||||
|
||||
GOPATH := $(shell go env GOPATH)
|
||||
|
||||
all: generate license fix vet fmt test lint tidy
|
||||
|
||||
fix:
|
||||
@@ -46,16 +45,23 @@ openapi:
|
||||
$(GOPATH)/bin/go-bindata --pkg kustomizationapi -o openapi/kustomizationapi/swagger.go openapi/kustomizationapi/swagger.json
|
||||
|
||||
$(MYGOBIN)/kind:
|
||||
GO111MODULE=on go get sigs.k8s.io/kind@v0.9.0
|
||||
( \
|
||||
set -e; \
|
||||
d=$(shell mktemp -d); cd $$d; \
|
||||
wget -O ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(shell uname)-amd64; \
|
||||
chmod +x ./kind; \
|
||||
mv ./kind $(MYGOBIN); \
|
||||
rm -rf $$d; \
|
||||
)
|
||||
|
||||
kpt:
|
||||
which $(GOPATH)/bin/kpt || GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
|
||||
$(MYGOBIN)/kpt:
|
||||
../hack/install_kpt.sh 0.34.0 $(MYGOBIN)
|
||||
|
||||
API_VERSION="v1.19.1"
|
||||
schema: $(MYGOBIN)/kind kpt
|
||||
schema: $(MYGOBIN)/kind $(MYGOBIN)/kpt
|
||||
cp $(HOME)/.kube/config /tmp/kubeconfig.txt | true
|
||||
$(MYGOBIN)/kind create cluster --image kindest/node:$(API_VERSION) --name=getopenapidata
|
||||
$(GOPATH)/bin/kpt live fetch-k8s-schema --pretty-print > /tmp/new_swagger.json
|
||||
$(MYGOBIN)/kpt live fetch-k8s-schema --pretty-print > /tmp/new_swagger.json
|
||||
$(MYGOBIN)/kind delete cluster --name=getopenapidata
|
||||
cp /tmp/kubeconfig.txt $(HOME)/.kube/config | true
|
||||
cp /tmp/new_swagger.json openapi/kubernetesapi/swagger.json
|
||||
|
||||
Reference in New Issue
Block a user