From 4f72e8a10da24aa231498c897db1153ef51ba2ee Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Mon, 20 Nov 2017 11:34:23 -0500 Subject: Bug 1512793- Fix idempotence issues in ASB deploy - Add support for annotations in oc_service - Use oc_service instead of oc_obj - Use oc_pvc instead of oc_obj - Work around lack of idempotency for oc_obj DeploymentConfig --- roles/lib_openshift/src/lib/service.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'roles/lib_openshift/src/lib') diff --git a/roles/lib_openshift/src/lib/service.py b/roles/lib_openshift/src/lib/service.py index 0e8cc3aa5..84620c518 100644 --- a/roles/lib_openshift/src/lib/service.py +++ b/roles/lib_openshift/src/lib/service.py @@ -10,6 +10,7 @@ class ServiceConfig(object): sname, namespace, ports, + annotations=None, selector=None, labels=None, cluster_ip=None, @@ -21,6 +22,7 @@ class ServiceConfig(object): self.name = sname self.namespace = namespace self.ports = ports + self.annotations = annotations self.selector = selector self.labels = labels self.cluster_ip = cluster_ip @@ -43,6 +45,9 @@ class ServiceConfig(object): self.data['metadata']['labels'] = {} for lab, lab_value in self.labels.items(): self.data['metadata']['labels'][lab] = lab_value + if self.annotations: + self.data['metadata']['annotations'] = self.annotations + self.data['spec'] = {} if self.ports: -- cgit v1.2.3