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

fix(envoy-filter): properly removes headers #1108

Merged

Conversation

bartoszmajsak
Copy link
Contributor

Description

The current implementation incorrectly calls removal of a header which is manifested in ingress gateway proxy logs when trying to access inference service:

envoy lua external/envoy/source/extensions/filters/http/lua/lua_filter.cc:930  script log: [string "function envoy_on_request(request_handle)..."]:10: bad argument #1 to 'remove' (N5Envoy10Extensions11HttpFilters3Lua16HeaderMapWrapperE expected, got string`

This fixes the Lua syntax and marks Service Mesh Features related to KServe setup as Managed(). This ensures that updating the existing filters will happen on operator upgrade or next reconcile.

How Has This Been Tested?

  • deploy latest incubation operator
  • create DSCI with Service Mesh enabled
  • create DSC with KServe enabled
  • check the content of the filter oc get envoyfilter/envoy-oauth-temp-fix-after -n istio-system -o yaml. Notice wrong syntax .remove in Lua snippet
  • try accessing ISVC and notice error in the ingress gateway logs
  • deploy operator image based on this PR
  • confirm logs are not showing up on the ingress gateway proxy
  • check the content of the filter oc get envoyfilter/envoy-oauth-temp-fix-after -n istio-system -o yaml. Notice correct/patched syntax :remove in Lua snippet

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Current implementation incorrectly calls removal of a header which is
manifested in ingress gateway proxy logs:

```
envoy lua external/envoy/source/extensions/filters/http/lua/lua_filter.cc:930  script log: [string "function envoy_on_request(request_handle)..."]:10: bad argument opendatahub-io#1 to 'remove' (N5Envoy10Extensions11HttpFilters3Lua16HeaderMapWrapperE expected, got string`
```

This fixes the Lua syntax and marks Service Mesh Features related to
KServe setup as `Managed()`. This ensures that updating the existing
filters will happen on operator upgrade or next reconcile.
Copy link

openshift-ci bot commented Jul 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zdtsw

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-merge-bot openshift-merge-bot bot merged commit 022f456 into opendatahub-io:incubation Jul 10, 2024
8 checks passed
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Jul 24, 2024
Current implementation incorrectly calls removal of a header which is
manifested in ingress gateway proxy logs:

```
envoy lua external/envoy/source/extensions/filters/http/lua/lua_filter.cc:930  script log: [string "function envoy_on_request(request_handle)..."]:10: bad argument #1 to 'remove' (N5Envoy10Extensions11HttpFilters3Lua16HeaderMapWrapperE expected, got string`
```

This fixes the Lua syntax and marks Service Mesh Features related to
KServe setup as `Managed()`. This ensures that updating the existing
filters will happen on operator upgrade or next reconcile.

(cherry picked from commit 022f456)
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Jul 24, 2024
Current implementation incorrectly calls removal of a header which is
manifested in ingress gateway proxy logs:

```
envoy lua external/envoy/source/extensions/filters/http/lua/lua_filter.cc:930  script log: [string "function envoy_on_request(request_handle)..."]:10: bad argument #1 to 'remove' (N5Envoy10Extensions11HttpFilters3Lua16HeaderMapWrapperE expected, got string`
```

This fixes the Lua syntax and marks Service Mesh Features related to
KServe setup as `Managed()`. This ensures that updating the existing
filters will happen on operator upgrade or next reconcile.

(cherry picked from commit 022f456)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants