As an SRE I'd like to be able to pass a flag such as --manager or --service to ocm-container to have the logic for logging directly into a service or managment cluster baked into the tooling.
Ideally, if I were to run ocm-container -C $CLUSTER_ID --manager it would have the following environment available for me:
CLUSTER_ID would be set to the CLUSTER ID that was passed
MC_ID would be set to the Manager Cluster ID
SC_ID would be set to the Service Cluster ID
HCP_NS would be set to ocm-$OCM_ENVIRONMENT-$CLUSTER_ID-$CLUSTER_NAME
HC_NS would be set to ocm-$OCM_ENVIRONMENT-$CLUSTER_ID
KUBELET_NS would be set to kubelet-$CLUSTER_ID
oc project would be auto-set to $HCP_NS
And if this were a classic ROSA cluster:
CLUSTER_ID would be set to the CLUSTER_ID that was passed
HIVE_NAME would be the display name of the hive
HIVE_NS would be uhc-$OCM_ENVIRONMENT-$CLUSTER_ID
oc project would be auto-set to $HIVE_NS
Essentially - the environment variables would be configured in a way similar to if you ran ocm-container -C $CLUSTER_ID, loaded into it and then ocm backplane login $CLUSTER_ID --manager from within the same container, so all of your env variable context is loaded for $CLUSTER_ID but you are just logged into the Management/Service Cluster.
As an SRE I'd like to be able to pass a flag such as
--manager
or--service
to ocm-container to have the logic for logging directly into a service or managment cluster baked into the tooling.Ideally, if I were to run
ocm-container -C $CLUSTER_ID --manager
it would have the following environment available for me:ocm-$OCM_ENVIRONMENT-$CLUSTER_ID-$CLUSTER_NAME
ocm-$OCM_ENVIRONMENT-$CLUSTER_ID
kubelet-$CLUSTER_ID
$HCP_NS
And if this were a classic ROSA cluster:
uhc-$OCM_ENVIRONMENT-$CLUSTER_ID
$HIVE_NS
Essentially - the environment variables would be configured in a way similar to if you ran
ocm-container -C $CLUSTER_ID
, loaded into it and thenocm backplane login $CLUSTER_ID --manager
from within the same container, so all of your env variable context is loaded for $CLUSTER_ID but you are just logged into the Management/Service Cluster.