Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Managed service namespace #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

sedroche
Copy link
Contributor

@sedroche sedroche commented Nov 22, 2018

Adding ManagedServiceNamespace functionality to the Broker

This work will be behind a flag initially so first verify that the current functionality works.

Current functionality

Creates an operator and fuse in a separate namespace.

  1. Deploy the broker with an image based on this PR.
    For oc cluster up

Make sure service catalog is installed.

$ oc cluster add service-catalog

Then run this script.

NOTE: Ensure broker is ready

$ svcat get brokers
           NAME            NAMESPACE                    URL                    STATUS  
+------------------------+-----------+---------------------------------------+--------+
  managed-service-broker               http://msb.managed-service-broker.svc   Ready 
  1. Check value of MANAGED_SERVICE_NAMESPACE flag in the pod
$ oc get pods
NAME                  READY     STATUS    RESTARTS   AGE
msb-fc4897f78-j8wc2   1/1       Running   0          20m

$ oc get pod msb-fc4897f78-j8wc2 -o=jsonpath='{.spec.containers[0].env[5].value}'
false
  1. MANAGED_SERVICE_NAMESPACE is false so run the integration tests
    Updated Instructions here

  2. Verify manually as well. Provision a fuse service and verify the namespace is created and the fuse operator and fuse instance are created correctly.

ManagedServiceNamespace functionality

Creates an operator in a namespace based on the CR name and shares the fuse instance to consumer namespaces also defined on the CR.

  1. Run this setup script.
    This will setup a new broker with MANAGED_SERVICE_NAMESPACE set to true and some consumer namespaces.

  2. Check value of MANAGED_SERVICE_NAMESPACE flag in the pod

$ oc get pods
NAME                  READY     STATUS    RESTARTS   AGE
msb-fc4897f78-j8wc2   1/1       Running   0          20m

$ oc get pod msb-fc4897f78-j8wc2 -o=jsonpath='{.spec.containers[0].env[5].value}'
true

NOTE: Ensure broker is ready

$ svcat get brokers
           NAME            NAMESPACE                    URL                    STATUS  
+------------------------+-----------+---------------------------------------+--------+
  managed-service-broker               http://msb.managed-service-broker.svc   Ready 
  1. MANAGED_SERVICE_NAMESPACE is true so run the integration tests with the test flag also set to true
$ oc expose svc/msb
$ export BROKER_URL=http://msb-managed-service-admin.127.0.0.1.nip.io
$ export MANAGED_SERVICE_NAMESPACE=true
$ make integration
  1. Verify manually as well. From within consumer1 or consumer2 namespace deploy fuse and the instance should be deployed into managed-namespace-project namespace.

@sedroche
Copy link
Contributor Author

@maleck13

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant