Uploaded image for project: 'Service Binding'
  1. Service Binding
  2. APPSVC-1321

Service Catalog initialization

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • Primaza 0.1
    • None
    • Service Binding
    • None
    • 3
    • False
    • None
    • False
    • Hide
      Feature: Initialize ServiceCatalog

          Scenario: Empty Service Catalog
              Given Primaza Cluster "main" is running
              When On Primaza Cluster "main", Resource is created
              """
              apiVersion: primaza.io/v1alpha1
              kind: ClusterEnvironment
              metadata:
                  name: worker
                  namespace: primaza-system
              spec:
                  environmentName: dev
                  clusterContextSecret: primaza-kw
              """
              Then On Primaza Cluster "main", ServiceCatalog "dev" is empty

          Scenario: Update Registered Service in Service Catalog
              Given Primaza Cluster "main" is running
              And On Primaza Cluster "main", Resource is created
              """
              apiVersion: primaza.io/v1alpha1
              kind: RegisteredService
              metadata:
                name: primaza-rsdb
                namespace: primaza-system
              spec:
                serviceClassIdentity:
                  - name: type
                    value: psqlserver
                serviceEndpointDefinition:
                  - name: host
                    value: mydavphost.io
                  - name: port
                    value: "5432"
                  - name: user
                    value: davp
                  - name: password
                    value: quedicelagente
                  - name: database
                    value: davpdata
                sla: L3
              """
              And On Primaza Cluster "main", RegisteredService "primaza-rsdb" state will eventually move to "Available"
              When On Primaza Cluster "main", Resource is created
              """
              apiVersion: primaza.io/v1alpha1
              kind: ClusterEnvironment
              metadata:
                  name: worker
                  namespace: primaza-system
              spec:
                  environmentName: dev
                  clusterContextSecret: primaza-kw
              """
              Then On Primaza Cluster "main", ServiceCatalog "dev" will contain RegisteredService "primaza-rsdb"

          Scenario: Service catalog is not initialized with unmatched Registered Services
              Given Primaza Cluster "main" is running
              And And On Primaza Cluster "main", Resource is created
              """
              apiVersion: primaza.io/v1alpha1
              kind: RegisteredService
              metadata:
                name: primaza-rsdb
                namespace: primaza-system
              spec:
                serviceClassIdentity:
                  - name: type
                    value: psqlserver
                  - name: provider
                    value: aws
                serviceEndpointDefinition:
                  - name: host
                    value: mydavphost.io
                  - name: port
                    value: "5432"
                  - name: user
                    value: davp
                  - name: password
                    value: quedicelagente
                  - name: database
                    value: davpdata
                constraints:
                  environments:
                    - !dev
                sla: L3
              """
              When On Primaza Cluster "main", Resource is created
              """
              apiVersion: primaza.io/v1alpha1
              kind: ClusterEnvironment
              metadata:
                  name: worker
                  namespace: primaza-system
              spec:
                  environmentName: dev
                  clusterContextSecret: primaza-kw
              """
              Then On Primaza Cluster "main", ServiceCatalog "dev" does not contain RegisteredService "primaza-rsdb"
      Show
      Feature: Initialize ServiceCatalog     Scenario: Empty Service Catalog         Given Primaza Cluster "main" is running         When On Primaza Cluster "main", Resource is created         """         apiVersion: primaza.io/v1alpha1         kind: ClusterEnvironment         metadata:             name: worker             namespace: primaza-system         spec:             environmentName: dev             clusterContextSecret: primaza-kw         """         Then On Primaza Cluster "main", ServiceCatalog "dev" is empty     Scenario: Update Registered Service in Service Catalog         Given Primaza Cluster "main" is running         And On Primaza Cluster "main", Resource is created         """         apiVersion: primaza.io/v1alpha1         kind: RegisteredService         metadata:           name: primaza-rsdb           namespace: primaza-system         spec:           serviceClassIdentity:             - name: type               value: psqlserver           serviceEndpointDefinition:             - name: host               value: mydavphost.io             - name: port               value: "5432"             - name: user               value: davp             - name: password               value: quedicelagente             - name: database               value: davpdata           sla: L3         """         And On Primaza Cluster "main", RegisteredService "primaza-rsdb" state will eventually move to "Available"         When On Primaza Cluster "main", Resource is created         """         apiVersion: primaza.io/v1alpha1         kind: ClusterEnvironment         metadata:             name: worker             namespace: primaza-system         spec:             environmentName: dev             clusterContextSecret: primaza-kw         """         Then On Primaza Cluster "main", ServiceCatalog "dev" will contain RegisteredService "primaza-rsdb"     Scenario: Service catalog is not initialized with unmatched Registered Services         Given Primaza Cluster "main" is running         And And On Primaza Cluster "main", Resource is created         """         apiVersion: primaza.io/v1alpha1         kind: RegisteredService         metadata:           name: primaza-rsdb           namespace: primaza-system         spec:           serviceClassIdentity:             - name: type               value: psqlserver             - name: provider               value: aws           serviceEndpointDefinition:             - name: host               value: mydavphost.io             - name: port               value: "5432"             - name: user               value: davp             - name: password               value: quedicelagente             - name: database               value: davpdata           constraints:             environments:               - !dev           sla: L3         """         When On Primaza Cluster "main", Resource is created         """         apiVersion: primaza.io/v1alpha1         kind: ClusterEnvironment         metadata:             name: worker             namespace: primaza-system         spec:             environmentName: dev             clusterContextSecret: primaza-kw         """         Then On Primaza Cluster "main", ServiceCatalog "dev" does not contain RegisteredService "primaza-rsdb"
    • AppSvc Sprint 234

      Owner: Architect:

      Francesco Ilario

      Story (Required)

      As a Developer,
      I would like Primaza to initialize the Service Catalog with existing Registered Services
      So that I can use an up-to-date list of Services

      Background (Required)

      Each Service Catalog is related to an Environment.
      When a Cluster Environment is added, if no Service Catalog exists for its own environment, then it will be created APPSVC-1314.

      Registered Services matching Cluster Environment may exists even if the Cluster Environment does not exist.
      An example is a Registered Service with no constraints.
      Hence, at Service Catalog creation we should populate it with all the Registered Services whose constraints matches the Service Catalog environment.

      See epic for arch document link.

      Glossary

      See glossary in architecture document

      Out of scope

      NA

      In Scope

      • Service Catalog initialization

      Approach(Required)

      When a Service Catalog is created, we should populate it with matching Registered Services.
      We should modify the Service Catalog creation logic in the Cluster Environment controller such that it also initializes the Service Catalog.

      When it is creating the new Service Catalog, it should also fetch all the Registered Services, calculate the matching ones, and populate the Service Catalog.

      Demo requirements(Required)

      NA

      Dependencies

      Edge Case

      NA

      BDD Tests

      You can find BDD Test specification for this story in the "Testing Instruction" Field Tab or in the GitHub Issue linked to this story.
      Click here for all BDD Tests Issues.

      Acceptance Criteria

      • Development
        ClusterEnvironment controller initializes the Service Catalogs with matching Registered Services
      • QE
        There are test cases for Service Catalog initialization
      • Docs
        There is a Section in our docs dedicated to explaining Service Catalog creation and initialization
        Update architecture document with any changes while implementing

      INVEST Checklist

      Dependencies identified
      Blockers noted and expected delivery timelines set
      Design is implementable
      Acceptance criteria agreed upon
      Story estimated

      Legend

      Unknown
      Verified
      Unsatisfied

              kmamgain@redhat.com Kartikey Mamgain (Inactive)
              rh-ee-filario Francesco Ilario
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: