Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Create prometheus operator (#872)
Browse files Browse the repository at this point in the history
* Begun creation of prometheus deployment

Created the role and namespace that the prometheus operator will sit in, need to do more research on the structure of these things to get setup prometheus within kubernetes.

* created prometheus deployment

we have a prometheus deployment that monitors the cluster, and can be queried for information on things like pod cpu usage

* Merge branch 'development' into create_metrics

* Fixing prometheus client not importing

* Need to solution to beginning exposing new metrics

* Added prometheus example and set up kubernetes deployment yamls

* Created prometheus operator and custom resources

After further investigation i found that what i need to be using is a prometheus operator (this is a deployment), see link here: https://github.com/coreos/prometheus-operator. This operator watches the service monitors created via a prometheus deployment (both are custom resource definitions) and passes them on to the prometheus server (which was deployed by the operator). 

Prometheus functions within kubernetes by scraping from http endpoints (services), defined by various config maps, applying rules to the scraped data, which can then be passed to a web UI such as Grafana or the prometheus query manager.

* bump version to 0.2.3

* Merge branch 'development' into create_prometheus_operator

* rebump version

* removed comment

* removed unused imports

* remove used imports

* removed broken line

* Merge branch 'development' into create_prometheus_operator

* bump version to 0.2.5
  • Loading branch information
TheseusGrey committed Oct 31, 2018
1 parent 2dd93b0 commit a58bb6e
Show file tree
Hide file tree
Showing 14 changed files with 6,390 additions and 46 deletions.
27 changes: 22 additions & 5 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions aimmo-game/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name = "pypi"
[packages]
kubernetes = "*"
aimmo-game = {editable = true, path = "."}
prometheus-client = "*"

[requires]
python_version = "2.7"
90 changes: 51 additions & 39 deletions aimmo-game/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion aimmo-game/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,5 @@ def run_game(port):
host, port = sys.argv[1], int(sys.argv[2])
socket_app = socketio.Middleware(socketio_server, flask_app,
socketio_path=os.environ.get('SOCKETIO_RESOURCE', 'socket.io'))

run_game(port)
eventlet.wsgi.server(eventlet.listen((host, port)), socket_app, debug=False)
4 changes: 4 additions & 0 deletions monitoring/0manifests/00namespace-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
Loading

0 comments on commit a58bb6e

Please sign in to comment.