Skip to content

Commit

Permalink
Remove delete feature from k8s config temporarilly
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjackson committed Jan 22, 2020
1 parent 26656d8 commit 16a0717
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkg/providers/k8s_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ func (c *K8sConfig) Create() error {
func (c *K8sConfig) Destroy() error {
c.log.Info("Destroy Kubernetes configuration", "ref", c.config.Name, "config", c.config.Paths)

err := c.setup()
if err != nil {
return err
}
// Not sure we should do this at the moment, since it is not possible to partially destroy.
// Destruction of a K8s cluster will delete any config associated
// When we implement the DAG for state re-imnplement this code
/*
err := c.setup()
if err != nil {
return err
}
return c.client.Delete(c.config.Paths)
*/

return c.client.Delete(c.config.Paths)
return nil
}

// Lookup the Kubernetes resources defined by the config
Expand Down

0 comments on commit 16a0717

Please sign in to comment.