diff --git a/images/miq-app/docker-assets/appliance-initialize.sh b/images/miq-app/docker-assets/appliance-initialize.sh index 9c81d162..068840f6 100755 --- a/images/miq-app/docker-assets/appliance-initialize.sh +++ b/images/miq-app/docker-assets/appliance-initialize.sh @@ -14,8 +14,6 @@ prepare_init_env # Check Memcached readiness check_svc_status ${MEMCACHED_SERVICE_NAME} 11211 -setup_memcached - # Check DB readiness check_svc_status ${DATABASE_SERVICE_NAME} 5432 diff --git a/images/miq-app/docker-assets/container-scripts/container-deploy-common.sh b/images/miq-app/docker-assets/container-scripts/container-deploy-common.sh index a71bee4c..7138308f 100644 --- a/images/miq-app/docker-assets/container-scripts/container-deploy-common.sh +++ b/images/miq-app/docker-assets/container-scripts/container-deploy-common.sh @@ -205,15 +205,6 @@ function init_appliance() { [ "$?" -ne "0" ] && echo "ERROR: Failed to initialize appliance, please check journal or appliance_console logs at ${APP_ROOT}/log/appliance_console.log" && exit 1 } -# Replace memcached host in EVM configuration to use assigned service pod IP -function setup_memcached() { - echo "== Applying memcached config ==" - - sed -i~ -E "s/:memcache_server:.*/:memcache_server: ${MEMCACHED_SERVICE_NAME}:11211/gi" "${APP_ROOT}/config/settings.yml" - - [ "$?" -eq "0" ] && return 0 || echo "ERROR: Failed to apply memcached configuration, please check journal or PV logs" && exit 1 -} - # Run hook script to enable future code to be run anywhere needed (i.e upgrades) function run_hook() { echo "== Calling Deployment Hook ==" diff --git a/templates/miq-template-ext-db.yaml b/templates/miq-template-ext-db.yaml index 5f7b8927..a9a82b5c 100644 --- a/templates/miq-template-ext-db.yaml +++ b/templates/miq-template-ext-db.yaml @@ -135,6 +135,9 @@ objects: secretKeyRef: name: "${NAME}-secrets" key: "database-url" + - + name: "MEMCACHED_SERVER" + value: "${MEMCACHED_SERVICE_NAME}:11211" - name: "MEMCACHED_SERVICE_NAME" value: "${MEMCACHED_SERVICE_NAME}" diff --git a/templates/miq-template.yaml b/templates/miq-template.yaml index 50a52f22..706e37a4 100644 --- a/templates/miq-template.yaml +++ b/templates/miq-template.yaml @@ -156,6 +156,9 @@ objects: secretKeyRef: name: "${NAME}-secrets" key: "database-url" + - + name: "MEMCACHED_SERVER" + value: "${MEMCACHED_SERVICE_NAME}:11211" - name: "MEMCACHED_SERVICE_NAME" value: "${MEMCACHED_SERVICE_NAME}"