Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Conversation

@aliok
Copy link
Member

@aliok aliok commented Feb 11, 2020

Issue to be fixed

Fixes #99

Proposed Changes

  • Backwards compatible change
  • Only use KUBECONFIG if the command line argument is empty

Release Note

NONE

Why having this fixes the tests at Operator Hub?
Operator Hub tests work like this:

  • Operator is installed on Minikube
  • A proxy side car is installed with the operator
  • That proxy side car would be the proxy for Kube API and the operator would talk to Kube API through that
  • Proxy injects the kubeconfig to the operator container with an env var called KUBECONFIG
  • Tests then check if the operator reacts to creation of CRs

In our case, operator was doing its work good, but was not using the proxy and thus the tests were unable to detect the operator's actions.

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@aliok: 0 warnings.

Details

In response to this:

Issue to be fixed

Fixes #99

Proposed Changes

  • Read KUBECONFIG env var, if kubeconfig command line argument is empty
  • Backwards compatible change

Release Note

NONE

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.

@knative-prow-robot
Copy link
Contributor

Hi @aliok. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@aliok
Copy link
Member Author

aliok commented Feb 11, 2020

This change fixes the Operator Hub checks. See operator-framework/community-operators#1218 for verification.

@aliok aliok force-pushed the read_kubeconfig_from_env_var branch from 00c5607 to 73321db Compare February 11, 2020 16:24
@aliok
Copy link
Member Author

aliok commented Feb 11, 2020

@houshengbo Changed as per your suggestion. It is a better way. Thanks a lot!

Copy link

@houshengbo houshengbo left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, houshengbo

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

@knative-prow-robot knative-prow-robot merged commit 7c0dd2c into knative:master Feb 11, 2020
@aliok aliok deleted the read_kubeconfig_from_env_var branch February 12, 2020 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support reading KubeConfig from KUBECONFIG env var

3 participants