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

Make Headers Setter context default value configurable (#35151) #35152

Closed
wants to merge 5 commits into from

Conversation

kyo-ke
Copy link

@kyo-ke kyo-ke commented Sep 12, 2024

Description:
Headers Setter extension

To make deafault value of Headers Setter extension's context, this PR adds DefaultValue option to HeaderConfig.

Link to tracking Issue:
Resolves #35151
also resolve #34412 (find this after creating above issue)

Testing:
add unittest to extension/headerssetterextension/extension_test.go.
testcases are for both with default_value option and without default_value.
confirm not changing behaviour with this PR and new functionality is forking.
also integration test with below configulation is done locally

  headers_setter:
      - action: upserte
        key: X-Scope-OrgID
        from_context: X-Scope-OrgID
        default_value: fake

Documentation:

default value can be added via default_value option.

Co-authored-by: So Koide so.koide@morganstanley.com

License Information

A copyright notice may be inserted here, if appropriate, as discussed in Section
5B below THIS SOFTWARE IS CONTRIBUTED SUBJECT TO THE TERMS OF THE APACHE
LICENSE, V.2.0. YOU MAY OBTAIN A COPY OF THE LICENSE AT
https://www.apache.org/licenses/LICENSE-2.0. THIS SOFTWARE IS LICENSED BY THE
COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF
NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY
EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY
OTHER REQUIRED LICENSE TERMS.

@kyo-ke kyo-ke requested a review from jpkrohling as a code owner September 12, 2024 06:06
@kyo-ke kyo-ke requested a review from a team September 12, 2024 06:06
Copy link

linux-foundation-easycla bot commented Sep 12, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@jpkrohling
Copy link
Member

Closing this in favor of #34455

@jpkrohling jpkrohling closed this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Headers Setter extension context default value configurable default value for header setter extension
3 participants