// DisableDefaultStorageClass disables the default storage class provisioner
// The addon-manager and kubectl apply cannot delete storageclasses
DisableDefaultStorageClass disables the default storage class provisioner
The addon-manager and kubectl apply cannot delete storageclasses
// DisableDefaultStorageClass disables the default storage class provisioner // The addon - manager and kubectl apply cannot delete storageclasses
func DisableDefaultStorageClass() error {
	loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()
	kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{})
	config, err := kubeConfig.ClientConfig()
	if err != nil {
		return errors.Wrap(err, "Error creating kubeConfig")
	}
	client, err := kubernetes.NewForConfig(config)
	if err != nil {
		return errors.Wrap(err, "Error creating new client from kubeConfig.ClientConfig()")
	}
	err = client.Storage().StorageClasses().Delete(constants.DefaultStorageClassProvisioner, &meta_v1.DeleteOptions{})
	if err != nil {
		return errors.Wrapf(err, "Error deleting default storage class %s", constants.DefaultStorageClassProvisioner)
	}
	return nil
}
func DisableDefaultStorageClass ( ) error { loadingRules := clientcmd . NewDefaultClientConfigLoadingRules ( ) kubeConfig := clientcmd . NewNonInteractiveDeferredLoadingClientConfig ( loadingRules , & clientcmd . ConfigOverrides { } ) config , err := kubeConfig . ClientConfig ( ) if err != nil { return errors . Wrap ( err , " " ) } client , err := kubernetes . NewForConfig ( config ) if err != nil { return errors . Wrap ( err , " " ) } err = client . Storage ( ) . StorageClasses ( ) . Delete ( constants . DefaultStorageClassProvisioner , & meta_v1 . DeleteOptions { } ) if err != nil { return errors . Wrapf ( err , " " , constants . DefaultStorageClassProvisioner ) } return nil }
DisableDefaultStorageClass disables the default storage class provisioner
The addon-manager and kubectl apply cannot delete storageclasses
DisableDefaultStorageClass disables the default storage class provisioner The addon - manager and kubectl apply cannot delete storageclasses