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

Delete ServiceCatalog on ClusterEnvironment deletion

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • Primaza 0.1
    • None
    • Service Binding
    • None
    • 3
    • False
    • None
    • False
    • Hide
      Feature: Delete ServiceCatalog on ClusterEnvironment deletion

          Scenario: ServiceCatalog is deleted
              Given Primaza Cluster "main" is running
              And Worker Cluster "worker" for "main" is running
              And Clusters "main" and "worker" can communicate
              And On Primaza Cluster "main", Worker "worker"'s ClusterContext secret "primaza-kw" is published
              And 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
              """
              And On Primaza Cluster "main", ServiceCatalog "dev" exists
              When On Primaza Cluster "main", ClusterEnvironment "worker" is deleted
              Then On Primaza Cluster "main", ServiceCatalog "dev" does not exist


          Scenario: ServiceCatalog is still required
              Given Primaza Cluster "main" is running
              And Worker Cluster "worker" for "main" is running
              And Clusters "main" and "worker" can communicate
              And On Primaza Cluster "main", Worker "worker"'s ClusterContext secret "primaza-kw" is published
              And On Primaza Cluster "main", Resource is created
              """
              apiVersion: primaza.io/v1alpha1
              kind: ClusterEnvironment
              metadata:
                  name: worker-1
                  namespace: primaza-system
              spec:
                  environmentName: dev
                  clusterContextSecret: primaza-kw
              """
              And On Primaza Cluster "main", ServiceCatalog "dev" exists
              And On Primaza Cluster "main", Resource is created
              """
              apiVersion: primaza.io/v1alpha1
              kind: ClusterEnvironment
              metadata:
                  name: worker-2
                  namespace: primaza-system
              spec:
                  environmentName: dev
                  clusterContextSecret: primaza-kw
              """
              When On Primaza Cluster "main", ClusterEnvironment "worker" is deleted
              Then On Primaza Cluster "main", ServiceCatalog "dev" exists
      Show
      Feature: Delete ServiceCatalog on ClusterEnvironment deletion     Scenario: ServiceCatalog is deleted         Given Primaza Cluster "main" is running         And Worker Cluster "worker" for "main" is running         And Clusters "main" and "worker" can communicate         And On Primaza Cluster "main", Worker "worker"'s ClusterContext secret "primaza-kw" is published         And 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         """         And On Primaza Cluster "main", ServiceCatalog "dev" exists         When On Primaza Cluster "main", ClusterEnvironment "worker" is deleted         Then On Primaza Cluster "main", ServiceCatalog "dev" does not exist     Scenario: ServiceCatalog is still required         Given Primaza Cluster "main" is running         And Worker Cluster "worker" for "main" is running         And Clusters "main" and "worker" can communicate         And On Primaza Cluster "main", Worker "worker"'s ClusterContext secret "primaza-kw" is published         And On Primaza Cluster "main", Resource is created         """         apiVersion: primaza.io/v1alpha1         kind: ClusterEnvironment         metadata:             name: worker-1             namespace: primaza-system         spec:             environmentName: dev             clusterContextSecret: primaza-kw         """         And On Primaza Cluster "main", ServiceCatalog "dev" exists         And On Primaza Cluster "main", Resource is created         """         apiVersion: primaza.io/v1alpha1         kind: ClusterEnvironment         metadata:             name: worker-2             namespace: primaza-system         spec:             environmentName: dev             clusterContextSecret: primaza-kw         """         When On Primaza Cluster "main", ClusterEnvironment "worker" is deleted         Then On Primaza Cluster "main", ServiceCatalog "dev" exists
    • AppSvc Sprint 235

      Owner: Architect:

      Francesco Ilario

      Story (Required)

      As a Primaza Administrator,
      I would like Primaza to delete a Service Catalog when no Cluster Environment exists for its environment
      So that I'll have a clean view of Service Catalogs

      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.

      When no Cluster Environment exists for the given Environment, we should delete the Service Catalog.

      See epic for arch document link.

      Glossary

      See glossary in architecture document

      Out of scope

      NA

      In Scope

      • Service Catalog deletion

      Approach(Required)

      When a Cluster Environment is deleted, the Cluster Environment controller should check if at least one Cluster Environment with the same Environment exists.
      If not, it should delete the Service Catalog for the given environment.

      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 deletes orphaned Service Catalogs
      • QE
        There are test cases for Service Catalog deletion
      • Docs
        There is a Section in our docs dedicated to explaining Service Catalog deletion
        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

              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: