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

Applying proxy-ssl-* directives on locations only #4981

Merged
merged 2 commits into from
Feb 24, 2020

Conversation

janosi
Copy link
Contributor

@janosi janosi commented Jan 29, 2020

What this PR does / why we need it:

Currently we can define different proxy-ssl directives for the different locations of the same server if we have different Ingress definitions for those locations. However one of those proxy-ssl directives is also set on the common server level. It has the following problems:

  • it is not possible to have locations with and without proxy-ssl configuration behind the same server. The server level proxy-ssl directives are used on those locations that anyway do not have such configuration in their Ingress definitions.
  • the selection of the server level proxy-ssl parameters is a bit "random" when the different locations have different proxy-ssl config: the proxy-ssl-secret parameter first in the alphabetically ordered set of all the proxy-ssl-secrets is selected and configured on server level.
    This PR is o further enhance this logic, so it can provide a more user-controlled way of configuring the parameters either on location level, or on both server and location levels.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Which issue/s this PR fixes

This PR implements a solution for the problem drafted in #4831

How Has This Been Tested?

Unit tests are added

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.

Laszlo Janosi added 2 commits January 29, 2020 10:00
Add: new parameter in the ConfigMap to control whether the proxy-ssl parameters of an Ingress should be applied on server and location levels, or only on location level
Add: logic in the config handling to work according to the new ConfigMap parameter
Add: unit test case
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 29, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @janosi. Thanks for your PR.

I'm waiting for a kubernetes 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.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 29, 2020
@aledbf
Copy link
Member

aledbf commented Jan 29, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 29, 2020
@codecov-io
Copy link

codecov-io commented Jan 29, 2020

Codecov Report

Merging #4981 into master will increase coverage by 2.75%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #4981      +/-   ##
=========================================
+ Coverage   58.54%   61.3%   +2.75%     
=========================================
  Files          88      88              
  Lines        6737    8119    +1382     
=========================================
+ Hits         3944    4977    +1033     
- Misses       2363    2608     +245     
- Partials      430     534     +104
Impacted Files Coverage Δ
internal/ingress/controller/controller.go 53.43% <66.66%> (+3.12%) ⬆️
internal/ingress/annotations/mirror/main.go 83.87% <0%> (-16.13%) ⬇️
internal/ingress/annotations/opentracing/main.go 61.11% <0%> (-2.53%) ⬇️
cmd/nginx/flags.go 81.81% <0%> (-2.04%) ⬇️
internal/ingress/metric/collectors/process.go 88.8% <0%> (-1.62%) ⬇️
internal/ingress/controller/endpoints.go 93.33% <0%> (-0.42%) ⬇️
internal/ingress/annotations/parser/main.go 74.22% <0%> (+0.03%) ⬆️
internal/ingress/annotations/authreq/main.go 75.86% <0%> (+0.47%) ⬆️
internal/ingress/controller/template/configmap.go 78.11% <0%> (+0.7%) ⬆️
internal/ingress/metric/collectors/socket.go 79.93% <0%> (+0.87%) ⬆️
... and 6 more

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 19e9e9d...bc79fe1. Read the comment docs.

@janosi
Copy link
Contributor Author

janosi commented Jan 29, 2020

/retest

1 similar comment
@janosi
Copy link
Contributor Author

janosi commented Jan 29, 2020

/retest

@janosi
Copy link
Contributor Author

janosi commented Feb 13, 2020

@aledbf Excuse me for my question, I am not familiar with the release process here, for example when a PR is merged. I can see that this one is removed from 0.29.0. Is there any blocking problem with this PR that I should solve? Thank you!

@aledbf
Copy link
Member

aledbf commented Feb 24, 2020

/lgtm
/approve

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

aledbf commented Feb 24, 2020

@janosi thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@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 24, 2020
@aledbf
Copy link
Member

aledbf commented Feb 24, 2020

/retest

@k8s-ci-robot k8s-ci-robot merged commit 6cd2235 into kubernetes:master Feb 24, 2020
@janosi janosi deleted the proxy-ssl-scope branch May 6, 2020 12:36
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

4 participants