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

Add ratelimit tier to database #2575

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Conversation

sgayangi
Copy link
Contributor

@sgayangi sgayangi commented Oct 15, 2024

This PR adds the ratelimit tier to the database

The database can be set up by adding the following config to the values.yaml

      commonController:
        deployment:
          database:
            # -- Enable Database mode for persistence
            enabled: true
            # -- name of the database containing controlplane data for the use of dataplane
            name: "DATAPLANE"
            host: "wso2apk-db-service.apk"
            port: 5432
            username: "wso2carbon"
            password: "wso2carbon"
            poolOptions:
              poolMaxConns: 4
              poolMinConns: 0
              poolMaxConnLifetime: "1h"
              poolMaxConnIdleTime: "1h"
              poolHealthCheckPeriod: "1m"
              poolMaxConnLifetimeJitter: "1s"

However, all invocation requests give a 403. Enforcer throws the error that subscription validation has failed. When debugged,

datastore = {SubscriptionDataStoreImpl@7535} 
 applicationKeyMappingMap = {ConcurrentHashMap@7542}  size = 0
 applicationMappingMap = {ConcurrentHashMap@7563}  size = 0
 applicationMap = {ConcurrentHashMap@7564}  size = 0
 subscriptionMap = {ConcurrentHashMap@7565}  size = 0
 jwtValidatorMap = {ConcurrentHashMap@7566}  size = 2

@sgayangi sgayangi added the trigger-action When this includes apk actions getting trigger for pr label Oct 15, 2024
@github-actions github-actions bot removed the trigger-action When this includes apk actions getting trigger for pr label Oct 15, 2024
@sgayangi sgayangi added the trigger-action When this includes apk actions getting trigger for pr label Oct 15, 2024
@CrowleyRajapakse
Copy link
Contributor

full fix will be addressed in another pr

@CrowleyRajapakse CrowleyRajapakse merged commit fff23a5 into wso2:main Oct 19, 2024
12 of 13 checks passed
@github-actions github-actions bot removed the trigger-action When this includes apk actions getting trigger for pr label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants