Skip to content

Commit

Permalink
Merge pull request #3 from appuio/defaultconfig
Browse files Browse the repository at this point in the history
get the kubernetes default config, freeze pip dependencies
  • Loading branch information
dtschan authored Nov 8, 2021
2 parents 7c9102e + 038162b commit a8502ba
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self):
else: # App is running on a developer workstation
kubernetes.config.load_kube_config()

self.k8s_config = kubernetes.client.Configuration()
self.k8s_config = kubernetes.client.Configuration().get_default_copy()
self.service_account_token = self.k8s_config.api_key['authorization'].partition(' ')[2]


Expand Down Expand Up @@ -163,5 +163,6 @@ def log_message(self, format, *args):


if __name__ == '__main__':
# only listen for connections from ose-oauth-proxy in the same pod (see template/openshift-prometheus-proxy.yaml)
httpd = ProxyHTTPServer(('127.0.0.1', 8080), partial(ProxyMetricsHandler, ProxyConfig()))
httpd.serve_forever()
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openshift
68 changes: 67 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,67 @@
openshift
#
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
#
# pip-compile requirements.in
#
cachetools==4.2.4
# via google-auth
certifi==2021.10.8
# via
# kubernetes
# requests
charset-normalizer==2.0.7
# via requests
google-auth==2.3.3
# via kubernetes
idna==3.3
# via requests
jinja2==3.0.2
# via openshift
kubernetes==12.0.1
# via openshift
markupsafe==2.0.1
# via jinja2
oauthlib==3.1.1
# via requests-oauthlib
openshift==0.12.1
# via -r requirements.in
pyasn1==0.4.8
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.2.8
# via google-auth
python-dateutil==2.8.2
# via kubernetes
python-string-utils==1.0.0
# via openshift
pyyaml==6.0
# via kubernetes
requests==2.26.0
# via
# kubernetes
# requests-oauthlib
requests-oauthlib==1.3.0
# via kubernetes
rsa==4.7.2
# via google-auth
ruamel.yaml==0.17.17
# via openshift
ruamel.yaml.clib==0.2.6
# via ruamel.yaml
six==1.16.0
# via
# google-auth
# kubernetes
# openshift
# python-dateutil
urllib3==1.26.7
# via
# kubernetes
# requests
websocket-client==1.2.1
# via kubernetes

# The following packages are considered to be unsafe in a requirements file:
# setuptools

0 comments on commit a8502ba

Please sign in to comment.