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

Refactor mirror feature #5015

Merged
merged 1 commit into from
Feb 5, 2020
Merged

Refactor mirror feature #5015

merged 1 commit into from
Feb 5, 2020

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Feb 5, 2020

What this PR does / why we need it:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Which issue/s this PR fixes

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 5, 2020
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2020
@aledbf aledbf force-pushed the mirror branch 2 times, most recently from 7fcd99b to f83d7e0 Compare February 5, 2020 02:55
@codecov-io
Copy link

codecov-io commented Feb 5, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@b9e944a). Click here to learn what that means.
The diff coverage is 54%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5015   +/-   ##
=========================================
  Coverage          ?   58.55%           
=========================================
  Files             ?       88           
  Lines             ?     6840           
  Branches          ?        0           
=========================================
  Hits              ?     4005           
  Misses            ?     2398           
  Partials          ?      437
Impacted Files Coverage Δ
internal/ingress/types_equals.go 17.29% <0%> (ø)
internal/ingress/controller/template/configmap.go 77.4% <100%> (ø)
internal/ingress/annotations/authreq/main.go 74.78% <100%> (ø)
internal/ingress/annotations/mirror/main.go 52% <33.33%> (ø)
internal/ingress/controller/template/template.go 79.97% <50%> (ø)
internal/ingress/annotations/parser/main.go 75.34% <81.81%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9e944a...b314635. Read the comment docs.

@aledbf
Copy link
Member Author

aledbf commented Feb 5, 2020

/retest

3 similar comments
@aledbf
Copy link
Member Author

aledbf commented Feb 5, 2020

/retest

@aledbf
Copy link
Member Author

aledbf commented Feb 5, 2020

/retest

@aledbf
Copy link
Member Author

aledbf commented Feb 5, 2020

/retest

@aledbf aledbf removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 5, 2020
proxy_pass %v;
}

`, loc.Mirror.URI, loc.Mirror.BackendURL))
Copy link
Member

Choose a reason for hiding this comment

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

Why are you not considering mirror_request_body here?

Copy link
Member Author

Choose a reason for hiding this comment

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

The mirror configuration is inside the location block

@@ -832,6 +832,7 @@ stream {
{{ template "CUSTOM_ERRORS" (buildCustomErrorDeps $errorLocation.UpstreamName $errorLocation.Codes $all.EnableMetrics) }}
{{ end }}

{{ buildMirrorLocations $server.Locations }}
Copy link
Member

Choose a reason for hiding this comment

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

Where're the hardcoded mirror directives here? I was expecting to see them being deleted from this file.

Copy link
Member Author

Choose a reason for hiding this comment

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

The mirror configuration is inside the location block

@aledbf aledbf force-pushed the mirror branch 2 times, most recently from b4e02af to e519ab4 Compare February 5, 2020 13:39
@aledbf aledbf changed the title WIP: Refactor mirror feature Refactor mirror feature Feb 5, 2020
@ElvinEfendi
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, ElvinEfendi

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

@aledbf
Copy link
Member Author

aledbf commented Feb 5, 2020

/retest

|[nginx.ingress.kubernetes.io/mirror-request-body](#mirror)|string|
|[nginx.ingress.kubernetes.io/mirror-target](#mirror)|string|
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
|[nginx.ingress.kubernetes.io/mirror-target](#mirror)|string|
|[nginx.ingress.kubernetes.io/mirror-target](#mirror)|URI|

@aledbf
Copy link
Member Author

aledbf commented Feb 5, 2020

/retest

@k8s-ci-robot k8s-ci-robot merged commit 4befa8c into kubernetes:master Feb 5, 2020
@aledbf aledbf deleted the mirror branch February 5, 2020 17:37
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants