Change spacing from 4 spaces to 2 spaces
This commit is contained in:
parent
ec14007268
commit
efa66d84e4
28 changed files with 936 additions and 913 deletions
|
@ -8,9 +8,11 @@ DEFAULT_QE_CONFIG_SECRET = 'quay-enterprise-config-secret'
|
|||
# The name of the quay enterprise deployment (not config app) that is used to query & rollout
|
||||
DEFAULT_QE_DEPLOYMENT_SELECTOR = 'app'
|
||||
|
||||
|
||||
def get_k8s_namespace():
|
||||
return os.environ.get('QE_K8S_NAMESPACE', DEFAULT_QE_NAMESPACE)
|
||||
|
||||
|
||||
class KubernetesConfig(object):
|
||||
def __init__(self, api_host='', service_account_token=SERVICE_ACCOUNT_TOKEN_PATH,
|
||||
qe_namespace=DEFAULT_QE_NAMESPACE,
|
||||
|
@ -31,7 +33,7 @@ class KubernetesConfig(object):
|
|||
with open(SERVICE_ACCOUNT_TOKEN_PATH, 'r') as f:
|
||||
service_token = f.read()
|
||||
|
||||
api_host=os.environ.get('KUBERNETES_SERVICE_HOST', '')
|
||||
api_host = os.environ.get('KUBERNETES_SERVICE_HOST', '')
|
||||
port = os.environ.get('KUBERNETES_SERVICE_PORT')
|
||||
if port:
|
||||
api_host += ':' + port
|
||||
|
@ -42,6 +44,3 @@ class KubernetesConfig(object):
|
|||
|
||||
return cls(api_host=api_host, service_account_token=service_token, qe_namespace=qe_namespace,
|
||||
qe_config_secret=qe_config_secret, qe_deployment_selector=qe_deployment_selector)
|
||||
|
||||
|
||||
|
||||
|
|
Reference in a new issue