Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-2844

Update nginx routing send capacity queries directly to swatch-contracts

XMLWordPrintable

      We have ported the capacity endpoints in swatch-contracts we should transfer the routing for the requests from swatch-api over to swatch-contracts. 

      The goal is that after this work goes live, if there are any issues then we can roll back to routing the traffic to swatch-api and everything will work properly. 

      Changes probably needed: swatch-api/deploy/clowdapp.yaml
      https://github.com/RedHatInsights/rhsm-subscriptions/blob/169b8b0d6cd935e0549be40bf37205650a0a70ba/swatch-api/deploy/clowdapp.yaml#L359

      The route should be rewritten to use /api/swatch-contracts/ instead of /api/rhsm-subscriptions/ since the clowdapp name will overwrite this portion of the route when deployed.

      Public routes are generally "protected" by an opt-in check. We don't want to do this anymore. If we hit an API to get information for an org that's not opted in, there wouldn't be any data to retrieve anyway, and a response with "no" information in it is still valid. Since we eventually want to do away with opt-in all together (auto opt in all the things), there's not a good reason to continue to implement it.

      Reference config:

      location /api/rhsm-subscriptions/v1/subscriptions/billing_account_ids {
        rewrite ^/api/rhsm-subscriptions/v1/subscriptions/billing_account_ids$ /api/swatch-contracts/v1/subscriptions/billing_account_ids break;
        proxy_pass http://swatch-contracts;
      } 

      Done Criteria

              jcarvaja@redhat.com Jose Carvajal Hilario
              bcourt@redhat.com Barnaby Court
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: