Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get the kubernetes default config, freeze pip dependencies #3

Merged
merged 3 commits into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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