func MountSecretToContainer(volumeName string, mountPath string, container *v1.Container) {
	volumeMount := v1.VolumeMount{
		Name:      volumeName,
		ReadOnly:  true,
		MountPath: mountPath,
	}
	container.VolumeMounts = append(container.VolumeMounts, volumeMount)
}
MountSecretToContainer mounts the secret volume with volumeName onto the mountPath into container.
package secret
import (
	"fmt"
	"strings"
	"github.com/liyinan926/spark-operator/pkg/config"
	"k8s.io/api/core/v1"
)
const (
	GoogleApplicationCredentialsEnvVar = "GOOGLE_APPLICATION_CREDENTIALS"
	ServiceAccountJSONKeyFileName = "key.json"
	ServiceAccountSecretVolumeName = "gcp-service-account-secret-volume"
)
func AddSecretVolumeToPod(secretVolumeName string, secretName string, pod *v1.Pod) {
	volume := v1.Volume{
		Name: secretVolumeName,
		VolumeSource: v1.VolumeSource{
			Secret: &v1.SecretVolumeSource{
				SecretName: secretName,
			},
		},
	}
	pod.Spec.Volumes = append(pod.Spec.Volumes, volume)
}