Skip to content

Conversation

@slagle
Copy link
Contributor

@slagle slagle commented Oct 21, 2025

Add documentation for configuring environment variables across all
data plane playbooks using the edpm_playbook_environment variable.

This change adds a new optional step in the data plane node creation
procedure that shows how to:

  • Create a secret containing the edpm_playbook_environment variable
    with proxy settings
  • Reference the secret using ansibleVarsFrom with secretRef in the
    OpenStackDataPlaneNodeSet CR

The documentation follows the same pattern as the existing
redhat-registry secret example and provides clear instructions
for operators who need to configure proxy settings or other
environment variables for their data plane deployments.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com
Jira: OSPRH-15529
Depends-On: openstack-k8s-operators/edpm-ansible#1049
Signed-off-by: James Slagle jslagle@redhat.com

@openshift-ci openshift-ci bot requested review from abays and stuggi October 21, 2025 11:53
Add documentation for configuring environment variables across all
data plane playbooks using the edpm_playbook_environment variable.

This change adds a new optional step in the data plane node creation
procedure that shows how to:
- Create a secret containing the edpm_playbook_environment variable
  with proxy settings
- Reference the secret using ansibleVarsFrom with secretRef in the
  OpenStackDataPlaneNodeSet CR

The documentation follows the same pattern as the existing
redhat-registry secret example and provides clear instructions
for operators who need to configure proxy settings or other
environment variables for their data plane deployments.

Docs are also added that show using edpm_bootstrap_command to set proxy
related environment variables in /etc/profile.d/proxy.sh.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Jira: OSPRH-15529
Depends-On: openstack-k8s-operators/edpm-ansible#1049
Signed-off-by: James Slagle <jslagle@redhat.com>
@slagle slagle force-pushed the edpm_playbook_environment branch from e705f09 to 80c221d Compare October 21, 2025 12:10
@slagle slagle requested a review from rabi October 21, 2025 12:22
Comment on lines +55 to +68
=== Using `edpm_bootstrap_command` for configuring system proxy settings

`edpm_bootstrap_command` can be used to configure system proxy settings by
creating a file under `/etc/profile.d` that defines the proxy environment
variables.

----
edpm_bootstrap_command: |
cat >/etc/profile.d/proxy.sh <<EOF
export http_proxy="http://USERNAME:PASSWORD@proxy-server.example.com:3128/"
export https_proxy="http://USERNAME:PASSWORD@proxy-server.example.com:3128/"
export no_proxy="localhost,127.0.0.1,::1" # Add any hosts to bypass the proxy
EOF
----
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we not drop this option and text completely as it can be confusing for the user or atleast detail what all situations it won't work. The statement below (won't always apply to tasks executed by ansible) sounds vague to me. I think instead of /etc/profile.d/proxy.sh using environment key value pairs in /etc/environment would always work and we can document that.

Copy link
Contributor Author

@slagle slagle Oct 29, 2025

Choose a reason for hiding this comment

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

/etc/environment doesn't apply to all processes.
The reason I added this part about still configuring the env vars is to show an example of how to configure a system proxy that would be used by any shell process, such as when the user logs in. I can drop the note about ansible though.

Copy link
Contributor

Choose a reason for hiding this comment

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

We need it for ansible tasks right as we're doing it with environment in the play. AFAIK ansible's non-interactive shell would always use /etc/environment.

Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed in slack I'll merge it and we revisit it later.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rabi, slagle

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 476792c into openstack-k8s-operators:main Oct 30, 2025
9 checks passed
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.

2 participants