Skip to content

Commit

Permalink
dind: Changed master and node config to allow local registry image fo…
Browse files Browse the repository at this point in the history
…rmat if needed
  • Loading branch information
Ravi Sankar Penta committed Jun 20, 2018
1 parent 0b390c0 commit b63ffa8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions images/dind/master/openshift-generate-master-config.sh
Expand Up @@ -36,6 +36,11 @@ function ensure-master-config() {
serving_ip_addr="${ip_addr1}"
fi

local image_format=""
if [[ -n "${OPENSHIFT_IMAGE_FORMAT}" ]]; then
image_format="--images=${OPENSHIFT_IMAGE_FORMAT}"
fi

mkdir -p "${config_path}"
(flock 200;
/usr/local/bin/oc adm ca create-master-certs \
Expand All @@ -46,6 +51,7 @@ function ensure-master-config() {

/usr/local/bin/openshift start master --write-config="${master_path}" \
--master="https://${serving_ip_addr}:8443" \
${image_format} \
--network-plugin="${OPENSHIFT_NETWORK_PLUGIN}" \
${OPENSHIFT_ADDITIONAL_ARGS}
) 200>"${config_path}"/.openshift-ca.lock
Expand Down
6 changes: 6 additions & 0 deletions images/dind/node/openshift-generate-node-config.sh
Expand Up @@ -51,6 +51,11 @@ function ensure-node-config() {
ip_addrs="${ip_addr1}"
fi

local image_format=""
if [[ -n "${OPENSHIFT_IMAGE_FORMAT}" ]]; then
image_format="--images=${OPENSHIFT_IMAGE_FORMAT}"
fi

# Hold a lock on the shared volume to ensure cert generation is
# performed serially. Cert generation is not compatible with
# concurrent execution since the file passed to --signer-serial
Expand All @@ -61,6 +66,7 @@ function ensure-node-config() {
--node="${host}" \
--master="${master_host}" \
--dns-ip="172.30.0.1" \
${image_format} \
--hostnames="${host},${ip_addrs}" \
--network-plugin="${OPENSHIFT_NETWORK_PLUGIN}" \
--node-client-certificate-authority="${master_config_path}/ca.crt" \
Expand Down

0 comments on commit b63ffa8

Please sign in to comment.