Skip to content

Commit

Permalink
Fix APIPolicyCR edit not reflected error
Browse files Browse the repository at this point in the history
  • Loading branch information
ashera96 committed Oct 31, 2023
1 parent a938d62 commit c5b3ab7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion adapter/internal/oasparser/model/http_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ func (swagger *AdapterInternalAPI) SetInfoHTTPRouteCR(httpRoute *gwapiv1b1.HTTPR
resourceAPIPolicy = concatAPIPolicies(resourceAPIPolicy, nil)
resourceAuthScheme = concatAuthSchemes(resourceAuthScheme, nil)
resourceRatelimitPolicy = concatRateLimitPolicies(resourceRatelimitPolicy, nil)
loggers.LoggerAPI.Error(resourceRatelimitPolicy)
addOperationLevelInterceptors(&policies, resourceAPIPolicy, resourceParams.InterceptorServiceMapping, resourceParams.BackendMapping, httpRoute.Namespace)

loggers.LoggerOasparser.Debugf("Calculating auths for API ..., API_UUID = %v", swagger.UUID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ metadata:
app.kubernetes.io/created-by: operator
name: apipolicy-sample
spec:
# TODO(user): Add fields here
override:
subscriptionValidation: true
targetRef:
group: dp.wso2.com
kind: API
name: 5be9683b59c60816f0d6bf8debbc8f59610810df
4 changes: 4 additions & 0 deletions adapter/internal/operator/synchronizer/data_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ func (ods *OperatorDataStore) processAPIState(apiNamespacedName types.Namespaced
}
}

if (cachedAPI.SubscriptionValidation != apiState.SubscriptionValidation) {
cachedAPI.SubscriptionValidation = apiState.SubscriptionValidation
}

if len(apiState.APIPolicies) != len(cachedAPI.APIPolicies) {
cachedAPI.APIPolicies = apiState.APIPolicies
updated = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ spec:
protocol: "TCP"
- containerPort: 18002
protocol: "TCP"
- containerPort: 5006
protocol: "TCP"
{{ include "apk-helm.deployment.resources" .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.resources | indent 10 }}
{{ include "apk-helm.deployment.env" .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.env | indent 10 }}
- name: ADAPTER_HOST_NAME
Expand Down Expand Up @@ -99,7 +97,7 @@ spec:
- name: enforcer_admin_pwd
value: admin
- name: JAVA_OPTS
value: -Dhttpclient.hostnameVerifier=AllowAll -Xms512m -Xmx512m -XX:MaxRAMFraction=2
value: -Dhttpclient.hostnameVerifier=AllowAll -Xms512m -Xmx512m -XX:MaxRAMFraction=2
volumeMounts:
- name: tmp
mountPath: /tmp
Expand Down

0 comments on commit c5b3ab7

Please sign in to comment.