diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2017-10-05 03:45:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-05 03:45:06 -0700 |
commit | cdbc995e65921210981e9fb3710a36c7d93a35dc (patch) | |
tree | 7475e2b3302da859fe60513f7c535c912aab6f0b /roles/openshift_logging/library | |
parent | 6efc786c94afa7eb9270b92d3d7022f190a3de48 (diff) | |
parent | f4c7d5e064fad263f618fb633d5c0d37c0a2a553 (diff) | |
download | openshift-cdbc995e65921210981e9fb3710a36c7d93a35dc.tar.gz openshift-cdbc995e65921210981e9fb3710a36c7d93a35dc.tar.bz2 openshift-cdbc995e65921210981e9fb3710a36c7d93a35dc.tar.xz openshift-cdbc995e65921210981e9fb3710a36c7d93a35dc.zip |
Merge pull request #5637 from wozniakjan/1496271_fix
Automatic merge from submit-queue.
Bug 1496271 - Perserve SCC for ES local persistent storage
ES can be modified to use node local persistent storage. This requires changing SCC and is described in docs:
https://docs.openshift.com/container-platform/3.6/install_config/aggregate_logging.html
During an upgrade, SCC defined by the user is ignored. This fix fetches SCC user defined as a fact and adds it to the ES DC which is later used.
Also includes cherrypicked fix for - Bug 1482661 - Preserve ES dc nodeSelector and supplementalGroups
cc @jcantrill
Diffstat (limited to 'roles/openshift_logging/library')
-rw-r--r-- | roles/openshift_logging/library/openshift_logging_facts.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py index 35accfb78..f10df8da5 100644 --- a/roles/openshift_logging/library/openshift_logging_facts.py +++ b/roles/openshift_logging/library/openshift_logging_facts.py @@ -171,22 +171,25 @@ class OpenshiftLoggingFacts(OCBaseCommand): if comp is not None: spec = dc_item["spec"]["template"]["spec"] facts = dict( + name=name, selector=dc_item["spec"]["selector"], replicas=dc_item["spec"]["replicas"], serviceAccount=spec["serviceAccount"], containers=dict(), volumes=dict() ) + if "nodeSelector" in spec: + facts["nodeSelector"] = spec["nodeSelector"] + if "supplementalGroups" in spec["securityContext"]: + facts["storageGroups"] = spec["securityContext"]["supplementalGroups"] + facts["spec"] = spec if "volumes" in spec: for vol in spec["volumes"]: clone = copy.deepcopy(vol) clone.pop("name", None) facts["volumes"][vol["name"]] = clone for container in spec["containers"]: - facts["containers"][container["name"]] = dict( - image=container["image"], - resources=container["resources"], - ) + facts["containers"][container["name"]] = container self.add_facts_for(comp, "deploymentconfigs", name, facts) def facts_for_services(self, namespace): |