Skip to content

Conversation

estroz
Copy link
Member

@estroz estroz commented Apr 15, 2021

Description of the change:

  • internal/{ansible,helm}: add --config flag, and configure flags to be applied on top of manager Options
  • internal/cmd/{ansible,helm}: apply config file data prior to flag data

Motivation for the change: This PR fixes manager component configuration for ansible-operator and helm-operator by adding the underlying reading and Manager option updating functionality. This was missing when the config file was originally added to both ansible/v1 and helm/v1 plugins. --config accepts a path to this config file.

/kind bug

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 15, 2021
@estroz estroz added this to the v1.6.1 milestone Apr 15, 2021
@estroz estroz force-pushed the bugfix/support-cr-config branch 2 times, most recently from c9e82fe to a5adfef Compare April 15, 2021 22:52
ansible-operator and helm-operator by adding the underlying reading and Manager option updating functionality. This was missing when the config file was originally added to both ansible/v1 and helm/v1 plugins. --config accepts a path to this config file. internal/{ansible,helm}: add --config flag, and configure existing flags to be applied on top of manager Options internal/cmd/{ansible,helm}: apply config file data prior to flag data Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
const (
AnsibleRolesPathEnvVar = "ANSIBLE_ROLES_PATH"
AnsibleCollectionsPathEnvVar = "ANSIBLE_COLLECTIONS_PATH"
)
Copy link
Contributor

@camilamacedo86 camilamacedo86 Apr 15, 2021

Choose a reason for hiding this comment

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

Nit: Many changes here are more refractory and cleanups. I am ok with move with that. But it might be better to be done in a diff pr since is a bug fix. However, that is fine too. (might not valuble the effort to split)

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

We are doing some cleanups together here but I do not think that is valid the effort to split in another pr. So, that's is OK for me 👍

Nit: We might need to change the PR title since we are no longer change the scaffolds here (just because that goes in the git log)

Otherwsise,

/lgtm

Really thank you for address these bug fixes so fast.
Great work btw 🥇

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2021
@estroz estroz changed the title (ansible/v1, helm/v1) add component config flag, and fix in existing scaffolds {ansible,helm}-operator run: add component config flag --config Apr 15, 2021
Signed-off-by: Eric Stroczynski <ericstroczynski@gmail.com>
@estroz estroz force-pushed the bugfix/support-cr-config branch from a5adfef to 27e6232 Compare April 16, 2021 21:19
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2021
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@estroz
Copy link
Member Author

estroz commented Apr 16, 2021

Added some unit tests.

@estroz estroz merged commit c48d4dd into operator-framework:master Apr 16, 2021
@estroz estroz deleted the bugfix/support-cr-config branch April 16, 2021 21:59
@estroz
Copy link
Member Author

estroz commented Apr 16, 2021

/cherry-pick v1.6.x

@openshift-cherrypick-robot

@estroz: new pull request created: #4780

In response to this:

/cherry-pick v1.6.x

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
4 participants