version -> api_version

This commit is contained in:
Natasha Sarkar
2020-10-13 13:21:19 -07:00
parent 1dfc9a88a8
commit 430665e984
2 changed files with 4 additions and 4 deletions

View File

@@ -43,12 +43,12 @@ openapi:
$(GOPATH)/bin/go-bindata --pkg kubernetesapi -o openapi/kubernetesapi/swagger.go openapi/kubernetesapi/swagger.json $(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 $(GOPATH)/bin/go-bindata --pkg kustomizationapi -o openapi/kustomizationapi/swagger.go openapi/kustomizationapi/swagger.json
VERSION="v1.19.1" API_VERSION="v1.19.1"
schema: schema:
which $(GOPATH)/bin/kind || GO111MODULE=on go get sigs.k8s.io/kind@v0.9.0 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 which $(GOPATH)/bin/kpt || GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
cp $(HOME)/.kube/config /tmp/kubeconfig.txt | true cp $(HOME)/.kube/config /tmp/kubeconfig.txt | true
$(GOPATH)/bin/kind create cluster --image kindest/node:$(VERSION) --name=getopenapidata $(GOPATH)/bin/kind create cluster --image kindest/node:$(API_VERSION) --name=getopenapidata
$(GOPATH)/bin/kpt live fetch-k8s-schema --pretty-print > openapi/kubernetesapi/swagger.json $(GOPATH)/bin/kpt live fetch-k8s-schema --pretty-print > openapi/kubernetesapi/swagger.json
$(GOPATH)/bin/kind delete cluster --name=getopenapidata $(GOPATH)/bin/kind delete cluster --name=getopenapidata
cp /tmp/kubeconfig.txt $(HOME)/.kube/config | true cp /tmp/kubeconfig.txt $(HOME)/.kube/config | true

View File

@@ -13,11 +13,11 @@ In the [kyaml] directory, fetch the schema
make schema make schema
``` ```
You can specify a specific version with the "VERSION" You can specify a specific version with the "API_VERSION"
parameter. The default version is v1.19.1. Here is an parameter. The default version is v1.19.1. Here is an
example for fetching the data for v1.14.1. example for fetching the data for v1.14.1.
``` ```
make schema VERSION=v1.14.1 make schema API_VERSION=v1.14.1
``` ```
This will update the [OpenAPI schema]. This will update the [OpenAPI schema].