func DeleteNamespace(name, kubeContext string, print bool) error {
	clientset, err := getClientSet(kubeContext)
	if err != nil {
		return err
	}
	deleteOptions := &metav1.DeleteOptions{}
	err = clientset.CoreV1().Namespaces().Delete(name, deleteOptions)
	if err != nil {
		return err
	}
	if print {
		log.Printf("deleted namespace \"%s\"", name)
	}
	return nil
}
DeleteNamespace deletes a namespace
package utils
import (
	"fmt"
	"log"
	"os"
	"path/filepath"
	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
	_ "k8s.io/client-go/plugin/pkg/client/auth"  
	"k8s.io/client-go/rest"
	"k8s.io/client-go/tools/clientcmd"
)
func CreateNamespace(name, kubeContext string, print bool) error {
	clientset, err := getClientSet(kubeContext)
	if err != nil {
		return err
	}
	nsSpec := &v1.Namespace{ObjectMeta: metav1.ObjectMeta{
		Name: name,
	}}
	_, err = clientset.CoreV1().Namespaces().Create(nsSpec)
	if err != nil {
		return err
	}
	if print {
		log.Printf("created namespace \"%s\"", name)
	}
	return nil
}
func GetNamespace(name, kubeContext string) (*v1.Namespace, error) {
	clientset, err := getClientSet(kubeContext)
	if err != nil {
		return nil, err
	}
	getOptions := metav1.GetOptions{}
	nsSpec, err := clientset.CoreV1().Namespaces().Get(name, getOptions)
	if err != nil {
		return nil, err
	}
	return nsSpec, nil
}
func UpdateNamespace(name, kubeContext string, annotationsToUpdate, labelsToUpdate map[string]string, print bool) error {
	if len(annotationsToUpdate) == 0 && len(labelsToUpdate) == 0 {
		return nil
	}
	clientset, err := getClientSet(kubeContext)
	if err != nil {
		return err
	}
	ns, err := GetNamespace(name, kubeContext)
	if err != nil {
		return err
	}
	annotations := overrideAttributes(ns.Annotations, annotationsToUpdate)
	labels := overrideAttributes(ns.Labels, labelsToUpdate)
	nsSpec := &v1.Namespace{ObjectMeta: metav1.ObjectMeta{
		Name:        name,
		Annotations: annotations,
		Labels:      labels,
	}}
	_, err = clientset.CoreV1().Namespaces().Update(nsSpec)
	if err != nil {
		return err
	}
	if print {
		if len(annotationsToUpdate) != 0 {
			log.Printf("updated environment \"%s\" with annotations (%s)", name, MapToString(annotations))
		}
		if len(labelsToUpdate) != 0 {
			log.Printf("updated environment \"%s\" with labels (%s)", name, MapToString(labels))
		}
	}
	return nil
}
func overrideAttributes(currentAttributes, attributesToUpdate map[string]string) map[string]string {
	attributes := currentAttributes
	if len(attributes) == 0 {
		attributes = attributesToUpdate
	} else {
		for k, v := range attributesToUpdate {
			attributes[k] = v
		}
	}
	return attributes
}