Skip to content

Commit

Permalink
draft commit with helper changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharsanan1 committed Aug 13, 2024
1 parent 571b24b commit 5ad2b5b
Show file tree
Hide file tree
Showing 10 changed files with 15,811 additions and 52 deletions.
4 changes: 2 additions & 2 deletions adapter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ tasks.named('go_revive_run').configure {
}

tasks.named('go_build').configure {
dependsOn go_revive_run
dependsOn go_vet
// dependsOn go_revive_run
// dependsOn go_vet
println("Running go build")
finalizedBy docker_build
}
Expand Down
3 changes: 3 additions & 0 deletions adapter/down.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kubectl scale deployment --replicas=0 -n apk apk-test-wso2-apk-adapter-deployment
./gradlew build
watch -n 1 minikube image rm apk-adapter:1.1.0-SNAPSHOT
2 changes: 2 additions & 0 deletions adapter/dup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minikube image load apk-adapter:1.1.0-SNAPSHOT
kubectl scale deployment --replicas=1 -n apk apk-test-wso2-apk-adapter-deployment
39 changes: 39 additions & 0 deletions adapter/notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
func getHTTPFilters(globalLuaScript string) []*hcmv3.HttpFilter {

r.ProviderResources.GatewayAPIResources.Subscribe(ctx),

buildXdsTCPListener(name, address string, port uint32, k

func (t *Translator) addXdsHTTPFilterChain(xdsListener *listenerv3.Listener,


func (t *Translator) buildExtAuth(policy *egv1a1.SecurityPolicy, resources *Resources, envoyProxy *egv1a1.EnvoyProxy) (*ir.ExtAuth, error) {
// create a function like this and hard code the enforcer cluster and add this to the ir.httproute

irRoute := &ir.HTTPRoute{
Name: irRouteName(httpRoute, ruleIdx, matchIdx),
}


Create a method name processAPI
in this function pass
securityPolicies []*API,
gateways []*GatewayContext,
routes []RouteContext,
resources *Resources,
xdsIR XdsIRMap,


loop through all targeted httproute refs in each API. find the correct irRoutes using this approach

irListener := xdsIR[irKey].GetHTTPListener(irListenerName(listener))
if irListener != nil {
for _, r := range irListener.Routes {
if strings.HasPrefix(r.Name, prefix) {

now add the extAuth to all the matching irRoutes


func enableFilterOnRoute(route *routev3.Route, filterName string) error {

k delete httproute apk-test-wso2-apk-authentication-endpoint-ds-httproute apk-test-wso2-apk-commonoauth-ds-httproute apk-test-wso2-apk-config-deploy-api-route apk-test-wso2-apk-jwks-endpoint-ds-httproute apk-test-wso2-apk-dcr-ds-httproute apk-test-wso2-apk-oauth-ds-httproute -n apk
Loading

0 comments on commit 5ad2b5b

Please sign in to comment.