-
Notifications
You must be signed in to change notification settings - Fork 42
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 option to read the operator namespace from an envirnment variable… #51
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @nunnatsa. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
…, or from a non-standard SA file. While developing an operator, it is impossible to run from a local environment variable if the code is trying to access the namespace file. For example, calling the `conditions.NewCondition` function will return an error when the operator is running in a development environment. This PR add to options to override the hard-coded path to the namespace file with another location: 1. by setting the new `OPERATOR_NAMESPACE` environment variable to the required namespace. 2. by setting the new `SA_FILE_PATH` environment variable to the local path of the namespace file. If both new environment variables are set, the namespace will be taken from the `OPERATOR_NAMESPACE` environment variable. Fixes operator-framework#50 Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
Pull Request Test Coverage Report for Build 507395819
💛 - Coveralls |
Closing, see #50 (comment) /close |
@estroz: Closed this PR. In response to this:
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. |
…, or from a non-standard SA file.
While developing an operator, it is impossible to run from a local environment variable if the code
is trying to access the namespace file. For example, calling the
conditions.NewCondition
functionwill return an error when the operator is running in a development environment.
This PR add to options to override the hard-coded path to the namespace file with another location:
OPERATOR_NAMESPACE
environment variable to the required namespace.SA_FILE_PATH
environment variable to the local path of the namespace file.If both new environment variables are set, the namespace will be taken from the
OPERATOR_NAMESPACE
environment variable.
Fixes #50
Signed-off-by: Nahshon Unna-Tsameret [email protected]