Skip to content
Merged
Changes from 1 commit
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
10 changes: 10 additions & 0 deletions ocp_install_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ EOF
fi
}

function additional_trust_bundle() {
if [ ! -z "$ADDITIONAL_TRUST_BUNDLE" ]; then
cat <<EOF
additionalTrustBundle: |
$(echo ${ADDITIONAL_TRUST_BUNDLE} | sed -e ':a;N;$!ba;s/\n/\n /g')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This will create a duplicate section when image_mirror_config is called (when MIRROR_IMAGES or ipv6 is specified), we'll need some way to merge the content.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why duplicated?does image_mirror_config adds this section?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

EOF
fi

Copy link
Copy Markdown
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
Copy Markdown
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 +200,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