src/server/pkg/deploy/assets/assets.go
func GetSecretEnvVars(storageBackend string) []v1.EnvVar {
	var envVars []v1.EnvVar
	if storageBackend != "" {
		envVars = append(envVars, v1.EnvVar{
			Name:  obj.StorageBackendEnvVar,
			Value: storageBackend,
		})
	}
	trueVal := true
	for envVar, secretKey := range obj.EnvVarToSecretKey {
		envVars = append(envVars, v1.EnvVar{
			Name: envVar,
			ValueFrom: &v1.EnvVarSource{
				SecretKeyRef: &v1.SecretKeySelector{
					LocalObjectReference: v1.LocalObjectReference{
						Name: client.StorageSecretName,
					},
					Key:      secretKey,
					Optional: &trueVal,
				},
			},
		})
	}
	return envVars
}
func GetSecretEnvVars(storageBackend string) []v1.EnvVar {
	var envVars []v1.EnvVar
	if storageBackend != "" {
		envVars = append(envVars, v1.EnvVar{
			Name:  obj.StorageBackendEnvVar,
			Value: storageBackend,
		})
	}
	trueVal := true
	for envVar, secretKey := range obj.EnvVarToSecretKey {
		envVars = append(envVars, v1.EnvVar{
			Name: envVar,
			ValueFrom: &v1.EnvVarSource{
				SecretKeyRef: &v1.SecretKeySelector{
					LocalObjectReference: v1.LocalObjectReference{
						Name: client.StorageSecretName,
					},
					Key:      secretKey,
					Optional: &trueVal,
				},
			},
		})
	}
	return envVars
}
func GetSecretEnvVars ( storageBackend string ) [ ] v1 . EnvVar { var envVars [ ] v1 . EnvVar if storageBackend != " " { envVars = append ( envVars , v1 . EnvVar { Name : obj . StorageBackendEnvVar , Value : storageBackend , } ) } trueVal := true for envVar , secretKey := range obj . EnvVarToSecretKey { envVars = append ( envVars , v1 . EnvVar { Name : envVar , ValueFrom : & v1 . EnvVarSource { SecretKeyRef : & v1 . SecretKeySelector { LocalObjectReference : v1 . LocalObjectReference { Name : client . StorageSecretName , } , Key : secretKey , Optional : & trueVal , } , } , } ) } return envVars }
// GetSecretEnvVars returns the environment variable specs for the storage secret.
GetSecretEnvVars returns the environment variable specs for the storage secret .