mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
added make target to fetch new openapi schema
This commit is contained in:
@@ -42,3 +42,15 @@ openapi:
|
||||
(which $(GOPATH)/bin/go-bindata || go get -v github.com/go-bindata/go-bindata)
|
||||
$(GOPATH)/bin/go-bindata --pkg kubernetesapi -o openapi/kubernetesapi/swagger.go openapi/kubernetesapi/swagger.json
|
||||
$(GOPATH)/bin/go-bindata --pkg kustomizationapi -o openapi/kustomizationapi/swagger.go openapi/kustomizationapi/swagger.json
|
||||
|
||||
VERSION="v1.19.1"
|
||||
schema:
|
||||
which $(GOPATH)/bin/kind || GO111MODULE=on go get sigs.k8s.io/kind@v0.9.0
|
||||
which $(GOPATH)/bin/kpt || GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
|
||||
cp $(HOME)/.kube/config /tmp/kubeconfig.txt | true
|
||||
$(GOPATH)/bin/kind create cluster --image kindest/node:$(VERSION) --name=getopenapidata
|
||||
$(GOPATH)/bin/kpt live fetch-k8s-schema --pretty-print > openapi/kubernetesapi/swagger.json
|
||||
kind delete cluster --name=getopenapidata
|
||||
cp /tmp/kubeconfig.txt $(HOME)/.kube/config | true
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user