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

Update ServiceBinding for claims from application namespace

XMLWordPrintable

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

      None

      Show
      None
    • False
    • Hide

      Scenario: Update claim with label selector from an application namespace
      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 Worker Cluster "worker", application namespace "applications" exists
      And Primaza cluster's "main" kubeconfig is available on "worker" in namespace "applications"
      And On Primaza Cluster "main", Resource is created
      """
      apiVersion: primaza.io/v1alpha1
      kind: ClusterEnvironment
      metadata:
      name: worker
      namespace: primaza-system
      spec:
      environmentName: stage
      clusterContextSecret: primaza-kw
      applicationNamespaces:

      • applications
        """
        And On Primaza Cluster "main", Resource is created
        """
        apiVersion: primaza.io/v1alpha1
        kind: RegisteredService
        metadata:
        name: primaza-rsdb
        namespace: primaza-system
        spec:
        constraints:
        environments:
      • stage
        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
        """
        And On Primaza Cluster "main", RegisteredService "primaza-rsdb" state will eventually move to "Available"
        And On Worker Cluster "worker", Resource is created
        """
        apiVersion: primaza.io/v1alpha1
        kind: ServiceClaim
        metadata:
        name: sc-test
        namespace: applications
        spec:
        serviceClassIdentity:
      • name: type
        value: psqlserver
      • name: provider
        value: aws
        serviceEndpointDefinitionKeys:
      • host
      • port
      • user
      • password
      • database
        environmentTag: stage
        application:
        kind: Deployment
        apiVersion: apps/v1
        selector:
        matchLabels:
        a: b
        c: d
        """
        And On Worker Cluster "worker", the status of ServiceClaim "sc-test" is "Resolved"
        And On Primaza Cluster "main", RegisteredService "primaza-rsdb" state will eventually move to "Claimed"
        And On Primaza Cluster "main", ServiceCatalog "stage" will not contain RegisteredService "primaza-rsdb"
        And On Worker Cluster "worker", the secret "sc-test" in namespace "applications" has the key "type" with value "psqlserver"
        And On Worker Cluster "worker", Resource is updated
        """
        apiVersion: primaza.io/v1alpha1
        kind: ServiceClaim
        metadata:
        name: sc-test
        namespace: applications
        spec:
        serviceClassIdentity:
      • name: type
        value: mysql
      • name: provider
        value: aws
        serviceEndpointDefinitionKeys:
      • host
      • port
      • user
      • password
      • database
        environmentTag: stage
        application:
        kind: Deployment
        apiVersion: apps/v1
        selector:
        matchLabels:
        a: b
        c: d
        """
        And On Worker Cluster "worker", the status of ServiceClaim "sc-test" is "Resolved"
        And On Primaza Cluster "main", RegisteredService "primaza-rsdb" state will eventually move to "Claimed"
        And On Primaza Cluster "main", ServiceCatalog "stage" will not contain RegisteredService "primaza-rsdb"
        And On Worker Cluster "worker", the secret "sc-test" in namespace "applications" has the key "type" with value "mysql"
      Show
      Scenario: Update claim with label selector from an application namespace 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 Worker Cluster "worker", application namespace "applications" exists And Primaza cluster's "main" kubeconfig is available on "worker" in namespace "applications" And On Primaza Cluster "main", Resource is created """ apiVersion: primaza.io/v1alpha1 kind: ClusterEnvironment metadata: name: worker namespace: primaza-system spec: environmentName: stage clusterContextSecret: primaza-kw applicationNamespaces: applications """ And On Primaza Cluster "main", Resource is created """ apiVersion: primaza.io/v1alpha1 kind: RegisteredService metadata: name: primaza-rsdb namespace: primaza-system spec: constraints: environments: stage 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 """ And On Primaza Cluster "main", RegisteredService "primaza-rsdb" state will eventually move to "Available" And On Worker Cluster "worker", Resource is created """ apiVersion: primaza.io/v1alpha1 kind: ServiceClaim metadata: name: sc-test namespace: applications spec: serviceClassIdentity: name: type value: psqlserver name: provider value: aws serviceEndpointDefinitionKeys: host port user password database environmentTag: stage application: kind: Deployment apiVersion: apps/v1 selector: matchLabels: a: b c: d """ And On Worker Cluster "worker", the status of ServiceClaim "sc-test" is "Resolved" And On Primaza Cluster "main", RegisteredService "primaza-rsdb" state will eventually move to "Claimed" And On Primaza Cluster "main", ServiceCatalog "stage" will not contain RegisteredService "primaza-rsdb" And On Worker Cluster "worker", the secret "sc-test" in namespace "applications" has the key "type" with value "psqlserver" And On Worker Cluster "worker", Resource is updated """ apiVersion: primaza.io/v1alpha1 kind: ServiceClaim metadata: name: sc-test namespace: applications spec: serviceClassIdentity: name: type value: mysql name: provider value: aws serviceEndpointDefinitionKeys: host port user password database environmentTag: stage application: kind: Deployment apiVersion: apps/v1 selector: matchLabels: a: b c: d """ And On Worker Cluster "worker", the status of ServiceClaim "sc-test" is "Resolved" And On Primaza Cluster "main", RegisteredService "primaza-rsdb" state will eventually move to "Claimed" And On Primaza Cluster "main", ServiceCatalog "stage" will not contain RegisteredService "primaza-rsdb" And On Worker Cluster "worker", the secret "sc-test" in namespace "applications" has the key "type" with value "mysql"
    • AppSvc Sprint 236

      Owner: Architect:

      Story (Required)

      As a Developer, I would like to update the claim and Service Binding directly from my application namespace so that I can bind an application in my namespace.

      Background (Required)

      The claim created from application namespace doesn't support updating service binding.

      Glossary

      <List of new terms and definition used in this story>

      Out of scope

      Deletion of service binding.

      In Scope

      In the Service Binding reconcile add support for update.

      Approach(Required)

      Use controllerutil.CreateOrUpdate to support update.

      Demo requirements(Required)

      NA

      Dependencies

      https://issues.redhat.com/browse/APPSVC-1299

      Edge Case

      NA

      Acceptance Criteria

      • Development:
        service binding is updated on service claim update
      • Tests:
        service binding is updated on service claim update

      INVEST Checklist

      Dependencies identified

      Blockers noted and expected delivery timelines set

      Design is implementable

      Acceptance criteria agreed upon

      Story estimated

      v

      Legend

      Unknown

      Verified

      Unsatisfied

              kmamgain@redhat.com Kartikey Mamgain (Inactive)
              bmuthuka Baiju Muthukadan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: