Closed clcollins closed 2 months ago
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: clcollins, samanthajayasinghe
The full list of commands accepted by this bot can be found here.
The pull request process is described here
This fixes a bug in ocm-container where the ocm environment was being read differently by the ocm cli and rosa cli due to the way ocm-container used the OCM_URL environment variable.
This PR will now set the environment inside the container to be, in this order:
OCM_CONFIG=~/.config/ocm/ocm.json.stage ocm-container
)OCMC_OCM_URL
environment varible--ocm-url
flaga (ocm-container --ocm-url poduction
)Upon running ocm-container, ocm-contianer will determine if the user is logged in, using the external OCM config file provide, and then authenticate if needed. It will then copy the OCM config to a file alongside any existing OCM config in the format
ocm.json.ocm-container.$ocm_env
. This file can be reused with ocm-container as the OCM_CONFIG env (or not), if desired. The contents of the new config file are copied into the contianer before it is launched, ensuring that the container is ephemeral, and no changes outside or inside the container change each other.This setup has been tested to confirm ROSA is using the correct OCM URL.
You will need to build and use a new OCM Container image that include the Containerfile changes in this PR in order to test it properly, and when merged, users will need to use the newly built image with the new binary.
A new 4.0.1 release should be cut with the contents of this when approved, and version 4.0.0 deleted/removed.
Fixes OSD-25064
Signed-off-by: Chris Collins collins.christopher@gmail.com