Bug 1954317 - [assisted operator] Environment variables set in the subscription not being inherited by the assisted-service container
Summary: [assisted operator] Environment variables set in the subscription not being i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.8.0
Assignee: David Zager
QA Contact: bjacot
URL:
Whiteboard: AI-Team-Platform
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-27 21:19 UTC by Trey West
Modified: 2021-07-27 23:04 UTC (History)
6 users (show)

Fixed In Version: OCP-Metal-v1.0.20.1
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 23:04:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 1593 0 None open OCPBUGSM-28382: Accept cm annotation on ASC 2021-04-30 16:57:27 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:04:37 UTC

Description Trey West 2021-04-27 21:19:31 UTC
Description of problem:

When setting the environment variable SERVE_HTTPS to "False" in the assisted-service-operator subscription, it is still set to "True" in the assisted-service container.


How reproducible:
100%


Steps to Reproduce:
1. Create a subscription with environment variable SERVE_HTTPS set to "False"
2. Check assisted-service container once you have applied the agentserviceconfig and the pod starts

Actual results:

bash-4.4$ echo $SERVE_HTTPS
True

Expected results:

bash-4.4$ echo $SERVE_HTTPS
False


Additional info:

Comment 1 Michael Hrivnak 2021-04-27 22:12:25 UTC
I think this is working as intended. Only some environment variables get propagated. We should update the docs here to clarify: https://github.com/openshift/assisted-service/blob/913aba6/docs/operator.md#subscription-config

If your goal is to serve the API without TLS, this will get you that for now: https://github.com/openshift/assisted-service/pull/1581

Comment 2 David Zager 2021-04-28 00:43:58 UTC
We aren't going to add more items to the "whitelist" of environment variables we will pass from the subscription.spec.config (specifically subscription.spec.config.env) -> assisted-service container. However, we will be addressing this bug by allowing an "unsupported.agent-install.openshift.io/assisted-service-config" annotation on the AgentServiceConfig that is the name of the configmap to be used as EnvFrom on the assisted-service container.

Comment 3 Trey West 2021-06-01 21:34:38 UTC
Verified

Comment 6 errata-xmlrpc 2021-07-27 23:04:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438


Note You need to log in before you can comment on or make changes to this bug.