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

Reconcile Service Catalog in application namespaces

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Minor Minor
    • Primaza 0.1
    • None
    • Service Binding
    • None
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide

      Feature: Reconcile Service Catalog in Application namespaces

      Scenario: Service Catalog is pushed to new Cluster Environments' application namespaces
      Given Primaza Cluster "primaza-main" is running
      And Worker Cluster "primaza-worker" for "primaza-main" is running
      And Clusters "primaza-main" and "primaza-worker" can communicate
      And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
      And On Primaza Cluster "primaza-main", Resource is created
      """
      apiVersion: primaza.io/v1alpha1
      kind: ClusterEnvironment
      metadata:
      name: primaza-worker
      namespace: primaza-system
      spec:
      environmentName: dev
      clusterContextSecret: primaza-kw
      """
      And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" state will eventually move to "Online"
      And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "Online" has Status "True"
      And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "ApplicationNamespacePermissionsRequired" has Status "False"
      And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "ServiceNamespacePermissionsRequired" has Status "False"
      And On Primaza Cluster "primaza-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
        sla: L3
        """
        When On Primaza Cluster "primaza-main", Resource is updated
        """
        apiVersion: primaza.io/v1alpha1
        kind: ClusterEnvironment
        metadata:
        name: primaza-worker
        namespace: primaza-system
        spec:
        environmentName: dev
        clusterContextSecret: primaza-kw
        applicationNamespaces:
      • applications
        """
        Then On Worker Cluster "primaza-worker", Service Catalog "servicecatalog-dev" exists in "applications"

      Scenario: Service Catalog is pushed to application namespaces of new Cluster Environments
      Given Primaza Cluster "primaza-main" is running
      And Worker Cluster "primaza-worker" for "primaza-main" is running
      And Clusters "primaza-main" and "primaza-worker" can communicate
      And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published
      And On Primaza Cluster "primaza-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
        sla: L3
        """
        When On Primaza Cluster "primaza-main", Resource is created
        """
        apiVersion: primaza.io/v1alpha1
        kind: ClusterEnvironment
        metadata:
        name: primaza-worker
        namespace: primaza-system
        spec:
        environmentName: dev
        clusterContextSecret: primaza-kw
        applicationNamespaces:
      • applications
        """
        Then On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" state will eventually move to "Online"
        And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "Online" has Status "True"
        And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "ApplicationNamespacePermissionsRequired" has Status "False"
        And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "ServiceNamespacePermissionsRequired" has Status "False"
        And On Worker Cluster "primaza-worker", Service Catalog "servicecatalog-dev" exists in "applications"
      Show
      Feature: Reconcile Service Catalog in Application namespaces Scenario: Service Catalog is pushed to new Cluster Environments' application namespaces Given Primaza Cluster "primaza-main" is running And Worker Cluster "primaza-worker" for "primaza-main" is running And Clusters "primaza-main" and "primaza-worker" can communicate And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published And On Primaza Cluster "primaza-main", Resource is created """ apiVersion: primaza.io/v1alpha1 kind: ClusterEnvironment metadata: name: primaza-worker namespace: primaza-system spec: environmentName: dev clusterContextSecret: primaza-kw """ And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" state will eventually move to "Online" And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "Online" has Status "True" And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "ApplicationNamespacePermissionsRequired" has Status "False" And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "ServiceNamespacePermissionsRequired" has Status "False" And On Primaza Cluster "primaza-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 sla: L3 """ When On Primaza Cluster "primaza-main", Resource is updated """ apiVersion: primaza.io/v1alpha1 kind: ClusterEnvironment metadata: name: primaza-worker namespace: primaza-system spec: environmentName: dev clusterContextSecret: primaza-kw applicationNamespaces: applications """ Then On Worker Cluster "primaza-worker", Service Catalog "servicecatalog-dev" exists in "applications" Scenario: Service Catalog is pushed to application namespaces of new Cluster Environments Given Primaza Cluster "primaza-main" is running And Worker Cluster "primaza-worker" for "primaza-main" is running And Clusters "primaza-main" and "primaza-worker" can communicate And On Primaza Cluster "primaza-main", Worker "primaza-worker"'s ClusterContext secret "primaza-kw" is published And On Primaza Cluster "primaza-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 sla: L3 """ When On Primaza Cluster "primaza-main", Resource is created """ apiVersion: primaza.io/v1alpha1 kind: ClusterEnvironment metadata: name: primaza-worker namespace: primaza-system spec: environmentName: dev clusterContextSecret: primaza-kw applicationNamespaces: applications """ Then On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" state will eventually move to "Online" And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "Online" has Status "True" And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "ApplicationNamespacePermissionsRequired" has Status "False" And On Primaza Cluster "primaza-main", ClusterEnvironment "primaza-worker" status condition with Type "ServiceNamespacePermissionsRequired" has Status "False" And On Worker Cluster "primaza-worker", Service Catalog "servicecatalog-dev" exists in "applications"
    • AppSvc Sprint 233, AppSvc Sprint 234

      Owner: Architect:

      Francesco Ilario

      Story (Required)

      As a Developer, I would like primaza to push Service Catalog in application namespaces on Cluster Environment creation and update so that I will have the catalog available in new application namespaces

      Background (Required)

      A namespace can be added to a Cluster Environment's application namespaces list after that several Service Catalog has been built.
      It is hence needed to push the Service catalog to the application namespace.

      See epic for arch document link.

      Glossary

      See glossary in architecture document

      Out of scope

      NA

      In Scope

      • Push Service Catalog

      Approach(Required)

      When a creation or update event on a Cluster Environment occurs, its application namespaces should be reconciled.
      For each application namespace, the Service Catalog should be pushed.
      If the Service Catalog already exists in the namespace, the error should be ignored.

      Demo requirements(Required)

      NA

      Dependencies

      NA

      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 pushes Service Catalog to new application namespace
      • QE
        There are test cases for application namespace initialization that checks for Service Catalog existence

      INVEST Checklist

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

      Legend

      Unknown
      Verified
      Unsatisfied

              fmehta@redhat.com Feny Mehta
              rh-ee-filario Francesco Ilario
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: