func GetStorageEndpointSuffix() string {
	if IsAzureStackCloud() {
		ascFile, err := RunCommandOnHost("cat", "/etc/kubernetes/azurestackcloud.json")
		if err != nil {
			log.Fatalf("unable to locate azurestackcloud.json to extract storage endpoint suffix: %v", err)
		}
		var azurestackcloud AzureStackCloud
		if err = json.Unmarshal([]byte(ascFile), &azurestackcloud); err != nil {
			log.Fatalf("unable to read azurestackcloud.json file: %v", err)
		}
		return azurestackcloud.StorageEndpointSuffix
	}
	return PublicAzureStorageEndpointSuffix
}
GetStorageEndpointSuffix returns the SES url from the JSON file as a string
package utils
import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"sync"
	"time"
	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
)
const (
	PublicAzureStorageEndpointSuffix = "core.windows.net"
	AzureStackCloudName = "AzureStackCloud"
)
var GetHostNameFunc = GetHostNameSingleton()
type Azure struct {
	Cloud string `json:"cloud"`
}
type AzureStackCloud struct {
	StorageEndpointSuffix string `json:"storageEndpointSuffix"`
}
type CommandOutputStreams struct {
	Stdout string
	Stderr string
}
func IsAzureStackCloud() bool {
	azureFile, err := RunCommandOnHost("cat", "/etc/kubernetes/azure.json")
	if err != nil {
		return false
	}
	var azure Azure
	if err = json.Unmarshal([]byte(azureFile), &azure); err != nil {
		return false
	}
	cloud := azure.Cloud
	return strings.EqualFold(cloud, AzureStackCloudName)
}
func CopyFileFromHost(source, destination string) error {
	sourceFile, err := RunCommandOnHost("cat", source)
	if err != nil {
		return fmt.Errorf("unable to retrieve source content: %w", err)
	}
	if err := os.MkdirAll(filepath.Dir(destination), os.ModePerm); err != nil {
		return fmt.Errorf("create path directories for file %s: %w", destination, err)
	}
	f, err := os.Create(destination)
	if err != nil {
		return fmt.Errorf("create file %s: %w", destination, err)
	}
	defer f.Close()
	_, err = f.Write([]byte(sourceFile))
	if err != nil {
		return fmt.Errorf("write data to file %s: %w", destination, err)
	}
	return nil
}