RedHatInsights / mocks

Mock services for testing cloud.redhat.com applications
4 stars 10 forks source link

Ability to turn on/off each mock #15

Open bsquizz opened 3 years ago

bsquizz commented 3 years ago

We should allow the option for you to turn off/on each mock

So for example you could deploy mocks with the env vars:

MOCK_RBAC=false
MOCK_ENTITLEMENTS=true

and then deploy the "real" rbac instead.

What needs to change is we should no longer define Service that "re-routes" applications to the mock in our template: https://github.com/RedHatInsights/mocks/blob/master/deploy/template.yaml#L177-L190

And instead that Service should be 'oc apply'd by the mocks initializer into the namespace when the app starts up: https://github.com/RedHatInsights/mocks/blob/master/crcmocks/initializer.py

As long as that Service which re-routes your apps to use the mock is absent, you should be good to go if you want to use the "real app" instead.