bootstrap
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
__pycache__
|
||||||
|
*.swp
|
||||||
|
*.pyc
|
||||||
24
app.py
Executable file
24
app.py
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import gevent.monkey
|
||||||
|
gevent.monkey.patch_all()
|
||||||
|
|
||||||
|
import connexion
|
||||||
|
import flask
|
||||||
|
from gevent.wsgi import WSGIServer
|
||||||
|
|
||||||
|
|
||||||
|
app = connexion.App(__name__)
|
||||||
|
|
||||||
|
@app.app.route('/')
|
||||||
|
def index():
|
||||||
|
return flask.render_template('index.html')
|
||||||
|
|
||||||
|
|
||||||
|
def get_clusters():
|
||||||
|
pass
|
||||||
|
|
||||||
|
app.add_api('swagger.yaml')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run(port=8080, server='gevent')
|
||||||
22
swagger.yaml
Normal file
22
swagger.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
swagger: "2.0"
|
||||||
|
info:
|
||||||
|
title: Kubernetes Operational View
|
||||||
|
version: "1.0"
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
paths:
|
||||||
|
/kubernetes-clusters:
|
||||||
|
get:
|
||||||
|
summary: Get Kubernetes clusters
|
||||||
|
operationId: app.get_clusters
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: List of Kubernetes clusters
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
kubernetes_clusters:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
api_server_url:
|
||||||
|
type: string
|
||||||
8
templates/index.html
Normal file
8
templates/index.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Kubernetes Operational View</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user