Skip to content

As a Korifi operator I want to be able to delete a security group #4105

@danail-branekov

Description

@danail-branekov

Acceptance

GIVEN I have deployed Korifi with experimental.securityGroups.enabled=true value
GIVEN I have created a security group
WHEN I delete a security group via DELETE /v3/security_groups/66a40c77-e709-481b-b3f3-b96d4b449463
THEN I should get a HTTP 202 Accepted response containing a Location header redirecting me to a job location I can track to check the progress of the deletion operation
WHEN I curl the Location URL above while the deletion is in progress
THEN I get a HTTP 200 OK response with "state": "PROCESSING" response
WHEN the security group is deleted
THEN curling the location url should return HTTP 200 OK with "state": "COMPLETE" response

Dev notes

  • The security group controller should delete Calico resources as part of the CFSecurityGroup finalization
  • The CFSecurityGroup finalizer should NOT let the CFSecurityGroup resource go until it makes sure that all related Calico resources are deleted. We have implemented a similar pattern of checking related resources in the app controller
  • The deletion job URL should return state processing while the CFSecurityGroup resource is still around and state complete when the CFSecurityGroup is gone.
  • When this story is done cf delete-security-group sg-name should work, so corresponding smoke tests should be added to the suite

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🇪🇺 To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions