summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/class/oc_adm_registry.py
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-02-24 13:38:31 -0500
committerGitHub <noreply@github.com>2017-02-24 13:38:31 -0500
commita451a468747a6d40ef65a4e4baca923b9adc74ea (patch)
tree77dae5308e6eb4131a3c36ce7b71976673f6aeeb /roles/lib_openshift/src/class/oc_adm_registry.py
parentbc0df10bdebc5dd1874c10ac701626e9ea6465de (diff)
parent1e3b9869a349ccdd8a72c796861a0b257880cf88 (diff)
downloadopenshift-a451a468747a6d40ef65a4e4baca923b9adc74ea.tar.gz
openshift-a451a468747a6d40ef65a4e4baca923b9adc74ea.tar.bz2
openshift-a451a468747a6d40ef65a4e4baca923b9adc74ea.tar.xz
openshift-a451a468747a6d40ef65a4e4baca923b9adc74ea.zip
Merge pull request #3467 from kwoodson/registry_updates
Fixed default variables. Added a fix to generated secret in env var.
Diffstat (limited to 'roles/lib_openshift/src/class/oc_adm_registry.py')
-rw-r--r--roles/lib_openshift/src/class/oc_adm_registry.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/class/oc_adm_registry.py b/roles/lib_openshift/src/class/oc_adm_registry.py
index eb78667ca..35b417059 100644
--- a/roles/lib_openshift/src/class/oc_adm_registry.py
+++ b/roles/lib_openshift/src/class/oc_adm_registry.py
@@ -232,6 +232,14 @@ class Registry(OpenShiftCLI):
def add_modifications(self, deploymentconfig):
''' update a deployment config with changes '''
+ # The environment variable for REGISTRY_HTTP_SECRET is autogenerated
+ # We should set the generated deploymentconfig to the in memory version
+ # the following modifications will overwrite if needed
+ if self.deploymentconfig:
+ result = self.deploymentconfig.get_env_var('REGISTRY_HTTP_SECRET')
+ if result:
+ deploymentconfig.update_env_var('REGISTRY_HTTP_SECRET', result['value'])
+
# Currently we know that our deployment of a registry requires a few extra modifications
# Modification 1
# we need specific environment variables to be set