Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read installer image digests from an environment variable #3009

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

mbarnes
Copy link
Contributor

@mbarnes mbarnes commented Jul 5, 2023

This depends on a couple Azure DevOps pull requests:

RP-Config : Add installerImageDigests to global configurations
ARO.Pipelines : Add INSTALLER_IMAGE_DIGESTS env to update-aro-openshift-versions

and a correction:
ARO.Pipelines : Base64-encode INSTALLER_IMAGE_DIGESTS

Which issue this PR addresses:

[ARO-3523] Move the ARO-Installer Image Digests to RP-Config

What this PR does / why we need it:

Changes aro update-versions to read ARO-Installer image digests from an environment variable named "INSTALLER_IMAGE_DIGESTS" which contains data from RP-Config.

"INSTALLER_IMAGE_DIGESTS" should be a JSON-formatted mapping of "MAJOR.MINOR" OpenShift versions to an image digest (e.g. {"4.10": "sha256:...", ...}).

Note: For this to work in Azure DevOps pipelines, the "INSTALLER_IMAGE_DIGESTS" content is Base64-encoded because it ends up embedded in build artifact files that are also in JSON format, which otherwise messes up JSON parsing. This is an unfortunate implementation detail that is not imposed on local development mode. For convenience, local development mode expects "INSTALLER_IMAGE_DIGESTS" content to be raw JSON as shown above.

Test plan for issue:

Local development mode testing and pipeline execution for public INT:

Is there any documentation that needs to be updated for this PR?

Updating the ARO-Installer image digests procedure will change from modifying ARO-RP code to modifying RP-Config.

INSTALLER_IMAGE_DIGESTS should be a JSON-formatted mapping of
"MAJOR.MINOR" OpenShift versions to an aro-installer image digest.
// Azure Safe Deployment Practices (SDP) instead of pushing the
// version tag and deploying to all regions at once.
var installerImageDigests map[string]string
jsonData := []byte(os.Getenv("INSTALLER_IMAGE_DIGESTS"))
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "INSTALLER_IMAGE_DIGESTS" can be a const and then used on lines 48,52 as well

@SudoBrendan SudoBrendan merged commit 8877ebc into Azure:master Jul 11, 2023
18 checks passed
@mbarnes mbarnes deleted the installer-image-digests branch July 11, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants