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

Add dump-conf option to the mask secret script #41

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

fmount
Copy link
Contributor

@fmount fmount commented Feb 29, 2024

This patch adds the ability to detect a .conf file within a Secret and dump its content in the current directory.
This helps to ease the troubleshooting when looking for a service config file: instead of base64 -d a portion of the Secret, we provide a dump of that file in the form <secret.yaml>-<config_file_name>.conf within the same directory.
For CI only purposes, there are situations where is required to look at connection strings, username and passwords generated in the operators context. For this reason a DO_NOT_MASK environment variable is provided to entirely bypass (in CI) the masking mechanism.

Implements: OSPRH-726

This patch adds the ability to the mask script to detect a .conf file (as
key in a secret), and dump its content in the current directory. This
helps to ease the troubleshooting when looking for a service config file:
instead of base64 -d a portion of the secret, we provide a dump of that
file in the form <secret.yaml>-<config_file_name>.conf within the same
directory.

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
Copy link
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

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

nice thanks, lgtm

Copy link
Contributor

@abays abays left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Feb 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described here

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 265e668 into openstack-k8s-operators:main Feb 29, 2024
4 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.

3 participants