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

Install and use a reverse proxy for staging devfile registry #5922

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Jul 6, 2022

What type of PR is this:

/kind feature

Installs a reverse proxy based on nginx to cache the requests to https://registry.stage.devfile.io

Limits the requests by User-Agent

I didn't find a way to configure the Load Balancer for nginx to see the original IP address of the client andd filter on this IP (the only IP nginx is seeing is the IP address of the load balancer)

What does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes #5920

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Jul 6, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 3ce7f79
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/62cee4d44f02cc00081d204a

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation label Jul 6, 2022
@openshift-ci openshift-ci bot requested review from anandrkskd and dharmit July 6, 2022 06:42
@feloy feloy requested review from rm3l and removed request for dharmit July 6, 2022 06:45
@odo-robot
Copy link

odo-robot bot commented Jul 6, 2022

Unit Tests on commit 598451e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jul 6, 2022

OpenShift Tests on commit 598451e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jul 6, 2022

Kubernetes Tests on commit 598451e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jul 6, 2022

Windows Tests (OCP) on commit 598451e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jul 6, 2022

Validate Tests on commit 598451e finished successfully.
View logs: TXT HTML

@feloy feloy changed the title Install and use a reverse proxy for staging devfile registry [WIP] Install and use a reverse proxy for staging devfile registry Jul 6, 2022
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Jul 6, 2022
@feloy feloy force-pushed the feature-5920/devfile-proxy-for-tests branch 8 times, most recently from 6e5a138 to 4e2beab Compare July 12, 2022 14:06
@feloy feloy changed the title [WIP] Install and use a reverse proxy for staging devfile registry Install and use a reverse proxy for staging devfile registry Jul 12, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Jul 12, 2022
@feloy feloy force-pushed the feature-5920/devfile-proxy-for-tests branch from 2f8d3de to b34dc75 Compare July 13, 2022 05:39
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information


# Need to have a DNS server to resolve the FQDNs provided to proxy_pass
# Use the DNS resolver provided to the container
resolver 172.21.0.10;
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, where did you retrieve this IP address?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the resolver set for the containers (in /etc/resolv.conf) in the IBM Cloud Kubernetes clusters

Copy link
Member

@rm3l rm3l Jul 13, 2022

Choose a reason for hiding this comment

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

Okay - thanks.

/lgtm

I'll let the others (@anandrkskd ) take another look to approve it.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jul 13, 2022
@valaparthvi
Copy link
Contributor

@anandrkskd Can you take a look at this?

@valaparthvi
Copy link
Contributor

/approve
The OpenShift tests pass on prow.

@openshift-ci
Copy link

openshift-ci bot commented Jul 19, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: valaparthvi

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Jul 19, 2022
@valaparthvi
Copy link
Contributor

/override ci/prow/unit-and-validate-test

@openshift-ci
Copy link

openshift-ci bot commented Jul 19, 2022

@valaparthvi: Overrode contexts on behalf of valaparthvi: ci/prow/unit-and-validate-test

In response to this:

/override ci/prow/unit-and-validate-test

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.

@valaparthvi
Copy link
Contributor

/retest

@anandrkskd
Copy link
Contributor

/test v4.10-integration-e2e

@openshift-ci
Copy link

openshift-ci bot commented Jul 20, 2022

@feloy: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/unit 32f273b link true /test unit

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@dharmit
Copy link
Member

dharmit commented Jul 20, 2022

/test v4.10-integration-e2e

Do we need this when the same tests on IBM Cloud have passed? Also, has the issue with unit and 4.10 integration tests on prow been completely addressed, that is, are they reliable again?

@valaparthvi
Copy link
Contributor

The IBM tests have passed in succession, so I am going to override the prow job for integration tests to move this forward.

/override ci/prow/v4.10-integration-e2e

@openshift-ci
Copy link

openshift-ci bot commented Jul 20, 2022

@valaparthvi: Overrode contexts on behalf of valaparthvi: ci/prow/v4.10-integration-e2e

In response to this:

The IBM tests have passed in succession, so I am going to override the prow job for integration tests to move this forward.

/override ci/prow/v4.10-integration-e2e

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.

@openshift-merge-robot openshift-merge-robot merged commit f4a860e into redhat-developer:main Jul 20, 2022
cdrage pushed a commit to cdrage/odo that referenced this pull request Aug 31, 2022
…developer#5922)

* Kubernetes Manifests to deploy nginx reverse proxy for staging devfile registry

* Get the external address of the loadBalancer service for devfile proxy

* If DEVFILE_PROXY is defined, use it as Devfile registry

* Fix get address from Windows

* Add some log displaying proxy address found

* Filter requests on user agent

* Add Go-http-client user-agent

* Add doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests are regularly failing on IBM Cloud due to connectivity error with Devfile registry
6 participants