summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/library/oc_route.py
diff options
context:
space:
mode:
authorFabian von Feilitzsch <fabian@fabianism.us>2017-08-29 15:41:36 -0400
committerFabian von Feilitzsch <fabian@fabianism.us>2017-10-02 16:21:17 -0400
commit7d8d21b7a5170fa3b187d7afe6d010a2e888fe74 (patch)
tree1a88b298ac87077c56a1c86bbfb13af6b87447f6 /roles/lib_openshift/library/oc_route.py
parente3d5519c6d68b9aa162a58e1a897b6e4f6b0eea1 (diff)
downloadopenshift-7d8d21b7a5170fa3b187d7afe6d010a2e888fe74.tar.gz
openshift-7d8d21b7a5170fa3b187d7afe6d010a2e888fe74.tar.bz2
openshift-7d8d21b7a5170fa3b187d7afe6d010a2e888fe74.tar.xz
openshift-7d8d21b7a5170fa3b187d7afe6d010a2e888fe74.zip
Update ansible-service-broker config to track latest broker
bring ansible service broker up to date with bearer token changes etcd -> 0.0.0.0 add auth information to broker resource in catalog add sandbox role to config simplify defaults add labels to oc_route use new oc_route label field Fix parameter ordering add port back Fix secret syntax
Diffstat (limited to 'roles/lib_openshift/library/oc_route.py')
-rw-r--r--roles/lib_openshift/library/oc_route.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/lib_openshift/library/oc_route.py b/roles/lib_openshift/library/oc_route.py
index 875e473ad..88bdbd775 100644
--- a/roles/lib_openshift/library/oc_route.py
+++ b/roles/lib_openshift/library/oc_route.py
@@ -90,6 +90,12 @@ options:
required: false
default: str
aliases: []
+ labels:
+ description:
+ - The labels to apply on the route
+ required: false
+ default: None
+ aliases: []
tls_termination:
description:
- The options for termination. e.g. reencrypt
@@ -1469,6 +1475,7 @@ class RouteConfig(object):
sname,
namespace,
kubeconfig,
+ labels=None,
destcacert=None,
cacert=None,
cert=None,
@@ -1483,6 +1490,7 @@ class RouteConfig(object):
self.kubeconfig = kubeconfig
self.name = sname
self.namespace = namespace
+ self.labels = labels
self.host = host
self.tls_termination = tls_termination
self.destcacert = destcacert
@@ -1508,6 +1516,8 @@ class RouteConfig(object):
self.data['metadata'] = {}
self.data['metadata']['name'] = self.name
self.data['metadata']['namespace'] = self.namespace
+ if self.labels:
+ self.data['metadata']['labels'] = self.labels
self.data['spec'] = {}
self.data['spec']['host'] = self.host
@@ -1715,6 +1725,7 @@ class OCRoute(OpenShiftCLI):
rconfig = RouteConfig(params['name'],
params['namespace'],
params['kubeconfig'],
+ params['labels'],
files['destcacert']['value'],
files['cacert']['value'],
files['cert']['value'],
@@ -1819,6 +1830,7 @@ def main():
state=dict(default='present', type='str',
choices=['present', 'absent', 'list']),
debug=dict(default=False, type='bool'),
+ labels=dict(default=None, type='dict'),
name=dict(default=None, required=True, type='str'),
namespace=dict(default=None, required=True, type='str'),
tls_termination=dict(default=None, type='str'),