Skip to content

Commit

Permalink
tear down CSI
Browse files Browse the repository at this point in the history
  • Loading branch information
sauterp committed Feb 21, 2024
1 parent 936929a commit 65a146c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/integ-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
--create-cluster \
--create-csi-secret \
--tear-down-csi \
--tear-down-cluster \
-run '^$' \
--image exoscale/csi-driver-integ-test:csi-pr-integ-test \
--cluster-name csi-pr-integ-test \
--zone ch-gva-2
Expand Down
14 changes: 9 additions & 5 deletions internal/integ/cluster/teardown.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,18 @@ func (c *Cluster) tearDownCSI() error {
for _, manifestPath := range allManifests {
err := c.K8s.DeleteManifest(c.exoV2Context, manifestDir+manifestPath)
if err != nil {
slog.Error("failed to delete manifest", "manifest", manifestPath)
slog.Error("failed to delete manifest", "manifest", manifestPath, "err", err)

finalErr = fmt.Errorf("errors while deleting manifests")
finalErr = fmt.Errorf("errors while deleting manifests: %w", err)
}
}

return finalErr
err := c.deleteAPIKeyAndRole()
if err != nil {
slog.Error("failed to clean up CSI API key and role", "err", err)

// TODO (sauterp) reenable once we have a non-legacy key in GH
// return c.deleteAPIKeyAndRole()
finalErr = fmt.Errorf("errors while cleaning up CSI API key and role: %w", err)
}

return finalErr
}

0 comments on commit 65a146c

Please sign in to comment.