Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,8 @@ set -x

# Image reference for installing hive. See hive_install.sh.
#export HIVE_DEPLOY_IMAGE="registry.svc.ci.openshift.org/openshift/hive-v4.0:hive"

# PEM-encoded X.509 certificate bundle that will be added to the nodes' trusted
# certificate store. This trust bundle may also be used when a proxy has
# been configured.
# export ADDITIONAL_TRUST_BUNDLE=$(cat ca)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're expecting this to start as a file, and we need it as a stream, it seems a little odd to be passing around the contents (rather than just the filename) in an environment variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaneb I believe you are right, I'll work to fix this

14 changes: 14 additions & 0 deletions ocp_install_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ EOF
fi
}

function additional_trust_bundle() {
if [ ! -z "$ADDITIONAL_TRUST_BUNDLE" ] && [ -z $MIRROR_IMAGES ]; then
cat <<EOF
additionalTrustBundle: |
$(echo ${ADDITIONAL_TRUST_BUNDLE} | awk '{ print " ", $0 }')
EOF
elif [ ! -z "$ADDITIONAL_TRUST_BUNDLE" ] && [ ! -z "$MIRROR_IMAGES" ]; then
cat <<EOF
$(echo ${ADDITIONAL_TRUST_BUNDLE} | awk '{ print " ", $0 }')
EOF
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A less complicated version of this function:

if [ -n "${ADDITIONAL_TRUST_BUNDLE}" ]; then
    if [ -z "${MIRROR_IMAGES}" ]; then
        echo "additionalTrustBundle: |"
    fi
    echo "${ADDITIONAL_TRUST_BUNDLE}" | awk '{ print " ", $0 }'
fi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

}

function cluster_network() {
if [[ "${IP_STACK}" == "v4" ]]; then
cat <<EOF
Expand Down Expand Up @@ -191,6 +204,7 @@ $(baremetal_network_configuration)
$(node_map_to_install_config_hosts $NUM_MASTERS 0 master)
$(node_map_to_install_config_hosts $NUM_WORKERS $NUM_MASTERS worker)
$(image_mirror_config)
$(additional_trust_bundle)
pullSecret: |
$(jq -c . $install_config_pull_secret)
sshKey: |
Expand Down