From 485711bc2f03d5f7313e2322a58991d96b843ba6 Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Wed, 19 Feb 2020 16:13:01 -0500 Subject: [PATCH 1/2] Rename the orchestrator to not include the app name This just complicates things if we want to reference the deployment or container by name for a limited benefit as we're expecting to be the only application in the namespace --- templates/app/orchestrator.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/app/orchestrator.yaml b/templates/app/orchestrator.yaml index a82d3870d..9de6e3b43 100644 --- a/templates/app/orchestrator.yaml +++ b/templates/app/orchestrator.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: Template metadata: - name: "${APP_NAME}-orchestrator" + name: orchestrator objects: - apiVersion: apps/v1 kind: Deployment metadata: - name: "${APP_NAME}-orchestrator" + name: orchestrator labels: app: "${APP_NAME}" spec: @@ -15,15 +15,15 @@ objects: replicas: 1 selector: matchLabels: - name: "${APP_NAME}-orchestrator" + name: orchestrator template: metadata: - name: "${APP_NAME}-orchestrator" + name: orchestrator labels: - name: "${APP_NAME}-orchestrator" + name: orchestrator spec: containers: - - name: "${APP_NAME}-orchestrator" + - name: orchestrator image: "${ORCHESTRATOR_IMAGE_NAMESPACE}/${ORCHESTRATOR_IMAGE_NAME}:${ORCHESTRATOR_IMAGE_TAG}" livenessProbe: exec: From 05c892c9f48496e2d5000b9a02427873bcc725d0 Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Wed, 19 Feb 2020 16:14:13 -0500 Subject: [PATCH 2/2] Add an image pull secret parameter This is provided to the orchestrator as an image pull secret and also as an environment variable so that it can deploy the worker containers with the same secret. https://github.com/ManageIQ/manageiq/issues/19699 --- parameters | 3 +++ templates/app/orchestrator.yaml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/parameters b/parameters index 7067db02b..4f67858d2 100644 --- a/parameters +++ b/parameters @@ -38,6 +38,9 @@ HTTPD_IMAGE_TAG=latest HTTPD_MEM_LIMIT=8192Mi HTTPD_MEM_REQ=512Mi +# Image pull secret to use for the orchestrator and worker images +#IMAGE_PULL_SECRET= + # memcached pod deployment information MEMCACHED_CPU_REQ=200m MEMCACHED_IMAGE_NAME=manageiq/memcached diff --git a/templates/app/orchestrator.yaml b/templates/app/orchestrator.yaml index 9de6e3b43..ef1ff746a 100644 --- a/templates/app/orchestrator.yaml +++ b/templates/app/orchestrator.yaml @@ -75,12 +75,16 @@ objects: key: encryption-key - name: CONTAINER_IMAGE_NAMESPACE value: "${ORCHESTRATOR_IMAGE_NAMESPACE}" + - name: IMAGE_PULL_SECRET + value: "${IMAGE_PULL_SECRET}" resources: requests: memory: "${ORCHESTRATOR_MEM_REQ}" cpu: "${ORCHESTRATOR_CPU_REQ}" limits: memory: "${ORCHESTRATOR_MEM_LIMIT}" + imagePullSecrets: + - name: "${IMAGE_PULL_SECRET}" serviceAccountName: "${APP_NAME}-orchestrator" terminationGracePeriodSeconds: 90 parameters: @@ -93,6 +97,8 @@ parameters: - name: GUID from: "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" generate: expression +- name: IMAGE_PULL_SECRET + value: '' - name: ORCHESTRATOR_IMAGE_NAMESPACE value: manageiq - name: ORCHESTRATOR_IMAGE_NAME