func bindEnvVar(container *apiv1.Container, version_config model.VersionConfig, index int) {
	for _, env := range version_config.Deployment.Containers[index].Envs {
		var envVar apiv1.EnvVar
		envVar.Name = env.EnvKey
		envVar.Value = env.EnvVal
		container.Env = append(container.Env, envVar)
	}
}
set all envVar
package handler
import (
	apiv1 "k8s.io/api/core/v1"
	appsv1b1 "k8s.io/api/extensions/v1beta1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"github.com/muxiyun/Mae/model"
	"k8s.io/apimachinery/pkg/util/intstr"
)
func bindVolumeSource(version_config model.VersionConfig) []apiv1.Volume {
	var volumes []apiv1.Volume
	for _, ctx := range version_config.Deployment.Containers {
		for _, vol := range ctx.Volumes {
			var volume apiv1.Volume  
			var hostpath apiv1.HostPathVolumeSource
			hostpath.Path = vol.HostPath
			hostpath.Type = &vol.HostPathType
			volume.Name = vol.VolumeName
			volume.HostPath = &hostpath
			volumes = append(volumes, volume)
		}
	}
	return volumes
}