diff options
author | Luke Meyer <sosiouxme@gmail.com> | 2018-01-10 15:55:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-10 15:55:09 -0500 |
commit | fa8b17c95de8445849ff8412f1c5affd63892c11 (patch) | |
tree | 367474826f28bd230a27905a33aaa90b4cf0d908 | |
parent | 14e5e8cfff847071d75ff7b7ffc99509214ba779 (diff) | |
parent | 4300173d0bfb61acedccca0f695be6d691420674 (diff) | |
download | openshift-fa8b17c95de8445849ff8412f1c5affd63892c11.tar.gz openshift-fa8b17c95de8445849ff8412f1c5affd63892c11.tar.bz2 openshift-fa8b17c95de8445849ff8412f1c5affd63892c11.tar.xz openshift-fa8b17c95de8445849ff8412f1c5affd63892c11.zip |
Merge pull request #6638 from nak3/add-keycheck-logging-facts
Add key existing check to collect facts for rolebidings
-rw-r--r-- | roles/openshift_logging/library/openshift_logging_facts.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py index 302a9b4c9..37ffb0204 100644 --- a/roles/openshift_logging/library/openshift_logging_facts.py +++ b/roles/openshift_logging/library/openshift_logging_facts.py @@ -276,7 +276,7 @@ class OpenshiftLoggingFacts(OCBaseCommand): return for item in role["subjects"]: comp = self.comp(item["name"]) - if comp is not None and namespace == item["namespace"]: + if comp is not None and namespace == item.get("namespace"): self.add_facts_for(comp, "clusterrolebindings", "cluster-readers", dict()) # this needs to end up nested under the service account... @@ -288,7 +288,7 @@ class OpenshiftLoggingFacts(OCBaseCommand): return for item in role["subjects"]: comp = self.comp(item["name"]) - if comp is not None and namespace == item["namespace"]: + if comp is not None and namespace == item.get("namespace"): self.add_facts_for(comp, "rolebindings", "logging-elasticsearch-view-role", dict()) # pylint: disable=no-self-use, too-many-return-statements |