forked from red-hat-data-services/rhods-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cherry-pick]: from incubation to 2.9 for grpc EnvoyFilter (red-hat-d…
…ata-services#219) * chore(api): move infrastructure/v1 to apis folder (opendatahub-io#894) Collects all APIs under the same parent package structure. * fix: Rework operator precondition checks (opendatahub-io#899) * init commit * tmp: switch to subsciption * tmp * fix up testing * linter on import * minor self nits * add bracket, make * use found,err for checking subscription Co-authored-by: Bartosz Majsak <[email protected]> * fix import + test error expected outputs * directly return errs rather than log and ret Co-authored-by: Bartosz Majsak <[email protected]> * remove unused log var from condiitons * move const fixtures to separate package * move creating op subscription to function * rename noop features in testing * remove redundant comments Co-authored-by: Bartosz Majsak <[email protected]> * move CreateSubscription to fixtures --------- Co-authored-by: Bartosz Majsak <[email protected]> * chore(feature): passes component name instead of whole struct (opendatahub-io#903) Co-authored-by: Aslak Knutsen <[email protected]> Simplify API as there is no need to pass the entire Component struct. * kserve: add grpconly envoy filter (opendatahub-io#888) --------- Co-authored-by: Aslak Knutsen <[email protected]> Co-authored-by: Cameron Garrison <[email protected]> Co-authored-by: Bartosz Majsak <[email protected]> Co-authored-by: Daniele <[email protected]>
- Loading branch information
1 parent
822ad1f
commit 5b7153b
Showing
19 changed files
with
159 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
pkg/feature/templates/servicemesh/kserve/grpc-envoyfilter-temp-fix.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Temporary workaround for https://issues.redhat.com/browse/RHOAIENG-165 | ||
apiVersion: networking.istio.io/v1alpha3 | ||
kind: EnvoyFilter | ||
metadata: | ||
name: grpc-only | ||
namespace: {{ .ControlPlane.Namespace }} | ||
labels: | ||
app.opendatahub.io/kserve: "true" | ||
app.kubernetes.io/part-of: kserve | ||
opendatahub.io/related-to: RHOAIENG-165 | ||
spec: | ||
priority: 20 | ||
workloadSelector: | ||
labels: | ||
protocol: "grpconly" | ||
configPatches: | ||
- applyTo: HTTP_FILTER | ||
match: | ||
context: SIDECAR_INBOUND | ||
listener: | ||
filterChain: | ||
filter: | ||
name: envoy.filters.network.http_connection_manager | ||
patch: | ||
operation: INSERT_BEFORE | ||
value: | ||
name: envoy.filters.http.lua | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua | ||
inlineCode: | | ||
function envoy_on_request(request_handle) | ||
local header_value = request_handle:headers():get("Content-Type") | ||
local pattern = "^application/grpc" | ||
if header_value:find(pattern) == nil then | ||
request_handle:respond({[":status"] = "400"}, "Invalid request, this endpoint only serves grpc.") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.