From 94b5b1cd03f71b5d125d49b210c8ab7754c833c7 Mon Sep 17 00:00:00 2001
From: Luke Meyer <lmeyer@redhat.com>
Date: Wed, 15 Nov 2017 16:18:59 -0500
Subject: registry-console template 3.8 consistency

don't hardcode the enterprise registry; construct the image like origin
---
 .../files/v3.8/enterprise/registry-console.yaml                  | 9 ++++++---
 .../files/v3.8/origin/registry-console.yaml                      | 7 +++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/roles/openshift_hosted_templates/files/v3.8/enterprise/registry-console.yaml b/roles/openshift_hosted_templates/files/v3.8/enterprise/registry-console.yaml
index 5acbb02b3..f04ce06d3 100644
--- a/roles/openshift_hosted_templates/files/v3.8/enterprise/registry-console.yaml
+++ b/roles/openshift_hosted_templates/files/v3.8/enterprise/registry-console.yaml
@@ -27,7 +27,7 @@ objects:
         spec:
           containers:
             - name: registry-console
-              image: ${IMAGE_PREFIX}registry-console:${IMAGE_VERSION}
+              image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}
               ports:
                 - containerPort: 9090
                   protocol: TCP
@@ -89,7 +89,7 @@ objects:
         - annotations: null
           from:
             kind: DockerImage
-            name: ${IMAGE_PREFIX}registry-console:${IMAGE_VERSION}
+            name: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}
           name: ${IMAGE_VERSION}
   - kind: OAuthClient
     apiVersion: v1
@@ -102,7 +102,10 @@ objects:
 parameters:
   - description: 'Specify "registry/repository" prefix for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", set prefix "registry.access.redhat.com/openshift3/"'
     name: IMAGE_PREFIX
-    value: "registry.access.redhat.com/openshift3/"
+    value: "openshift3/"
+  - description: 'Specify component name for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", use base name "registry-console"'
+    name: IMAGE_BASENAME
+    value: "registry-console"
   - description: 'Specify image version; e.g. for "registry.access.redhat.com/openshift3/registry-console:v3.8", set version "v3.8"'
     name: IMAGE_VERSION
     value: "v3.8"
diff --git a/roles/openshift_hosted_templates/files/v3.8/origin/registry-console.yaml b/roles/openshift_hosted_templates/files/v3.8/origin/registry-console.yaml
index a78146ca4..a75340eb7 100644
--- a/roles/openshift_hosted_templates/files/v3.8/origin/registry-console.yaml
+++ b/roles/openshift_hosted_templates/files/v3.8/origin/registry-console.yaml
@@ -27,7 +27,7 @@ objects:
         spec:
           containers:
             - name: registry-console
-              image: ${IMAGE_PREFIX}kubernetes:${IMAGE_VERSION}
+              image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}
               ports:
                 - containerPort: 9090
                   protocol: TCP
@@ -89,7 +89,7 @@ objects:
         - annotations: null
           from:
             kind: DockerImage
-            name: ${IMAGE_PREFIX}kubernetes:${IMAGE_VERSION}
+            name: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}
           name: ${IMAGE_VERSION}
   - kind: OAuthClient
     apiVersion: v1
@@ -103,6 +103,9 @@ parameters:
   - description: 'Specify "registry/namespace" prefix for container image; e.g. for "registry.example.com/cockpit/kubernetes:latest", set prefix "registry.example.com/cockpit/"'
     name: IMAGE_PREFIX
     value: "cockpit/"
+  - description: 'Specify component name for container image; e.g. for "registry.example.com/cockpit/kubernetes:latest", use base name "kubernetes"'
+    name: IMAGE_BASENAME
+    value: "kubernetes"
   - description: 'Specify image version; e.g. for "cockpit/kubernetes:latest", set version "latest"'
     name: IMAGE_VERSION
     value: latest
-- 
cgit v1.2.3