From 16a071792d780c91cc94936c6beacd53a3016ca5 Mon Sep 17 00:00:00 2001 From: Nic Jackson Date: Wed, 22 Jan 2020 19:49:09 +0000 Subject: [PATCH] Remove delete feature from k8s config temporarilly --- pkg/providers/k8s_config.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkg/providers/k8s_config.go b/pkg/providers/k8s_config.go index 48e6dae1..133b0b55 100644 --- a/pkg/providers/k8s_config.go +++ b/pkg/providers/k8s_config.go @@ -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