Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b6af9e72
Commit
b6af9e72
authored
Jan 25, 2019
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add openapi serialization script
parent
71a6d582
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
openapi-save.sh
openapi-save.sh
+32
-0
No files found.
openapi-save.sh
0 → 100755
View file @
b6af9e72
#!/bin/bash
set
-e
exit
()
{
exit
=
$?
kill
-9
$ETCD_PID
$HYPERKUBE_PID
2>/dev/null
||
true
rm
-f
hyperkube
return
$exit
}
trap exit
EXIT
echo
Compiling hyperkube
./hack/update-codegen.sh
||
./hack/update-codegen.sh
go build
-o
hyperkube ./cmd/hyperkube
etcd &
ETCD_PID
=
$!
./hyperkube kube-apiserver
--etcd-servers
http://localhost:2379
--cert-dir
$(
pwd
)
/certs &
HYPERKUBE_PID
=
$!
while
!
curl
-f
http://localhost:8080/healthz
;
do
echo
waiting
for
k8s
sleep
1
done
curl http://localhost:8080/openapi/v2
>
openapi.json
curl
-H
"Accept: application/com.github.proto-openapi.spec.v2@v1.0+protobuf"
http://localhost:8080/openapi/v2
>
openapi.pb
git add openapi.json
git add openapi.pb
git commit
-m
"Save openapi"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment