diff options
author | Fabian von Feilitzsch <fabian@fabianism.us> | 2017-08-29 15:41:36 -0400 |
---|---|---|
committer | Fabian von Feilitzsch <fabian@fabianism.us> | 2017-10-02 16:21:17 -0400 |
commit | 7d8d21b7a5170fa3b187d7afe6d010a2e888fe74 (patch) | |
tree | 1a88b298ac87077c56a1c86bbfb13af6b87447f6 /roles/lib_openshift/library/oc_secret.py | |
parent | e3d5519c6d68b9aa162a58e1a897b6e4f6b0eea1 (diff) | |
download | openshift-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_secret.py')
-rw-r--r-- | roles/lib_openshift/library/oc_secret.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/roles/lib_openshift/library/oc_secret.py b/roles/lib_openshift/library/oc_secret.py index c010607e8..b96654e5b 100644 --- a/roles/lib_openshift/library/oc_secret.py +++ b/roles/lib_openshift/library/oc_secret.py @@ -90,6 +90,12 @@ options: required: false default: default aliases: [] + annotations: + description: + - Annotations to apply to the object + required: false + default: None + aliases: [] files: description: - A list of files provided for secrets @@ -1464,13 +1470,15 @@ class SecretConfig(object): namespace, kubeconfig, secrets=None, - stype=None): + stype=None, + annotations=None): ''' constructor for handling secret options ''' self.kubeconfig = kubeconfig self.name = sname self.type = stype self.namespace = namespace self.secrets = secrets + self.annotations = annotations self.data = {} self.create_dict() @@ -1487,6 +1495,8 @@ class SecretConfig(object): if self.secrets: for key, value in self.secrets.items(): self.data['data'][key] = value + if self.annotations: + self.data['metadata']['annotations'] = self.annotations # pylint: disable=too-many-instance-attributes class Secret(Yedit): @@ -1698,8 +1708,7 @@ class OCSecret(OpenShiftCLI): elif params['contents']: files = Utils.create_tmp_files_from_contents(params['contents']) else: - return {'failed': True, - 'msg': 'Either specify files or contents.'} + files = [{'name': 'null', 'path': os.devnull}] ######## # Create @@ -1783,6 +1792,7 @@ def main(): debug=dict(default=False, type='bool'), namespace=dict(default='default', type='str'), name=dict(default=None, type='str'), + annotations=dict(default=None, type='dict'), type=dict(default=None, type='str'), files=dict(default=None, type='list'), delete_after=dict(default=False, type='bool'), |