Fix CLI not update function's secret/configmap correctly (#512)

This PR addressed some issues introduced in PR399. Also, now env builders and function pods can mount shared secret/configmap volumes correctly.
This commit is contained in:
Ta-Ching Chen
2018-02-28 05:28:05 +08:00
committed by GitHub
parent 23942fdf7d
commit 5e2f984136
7 changed files with 199 additions and 75 deletions
+9 -9
View File
@@ -504,19 +504,19 @@ func (gp *GenericPool) createPool() error {
Spec: apiv1.PodSpec{
Volumes: []apiv1.Volume{
{
Name: "userfunc",
Name: fission.SharedVolumeUserfunc,
VolumeSource: apiv1.VolumeSource{
EmptyDir: &apiv1.EmptyDirVolumeSource{},
},
},
{
Name: "secrets",
Name: fission.SharedVolumeSecrets,
VolumeSource: apiv1.VolumeSource{
EmptyDir: &apiv1.EmptyDirVolumeSource{},
},
},
{
Name: "config",
Name: fission.SharedVolumeConfigmaps,
VolumeSource: apiv1.VolumeSource{
EmptyDir: &apiv1.EmptyDirVolumeSource{},
},
@@ -530,15 +530,15 @@ func (gp *GenericPool) createPool() error {
TerminationMessagePath: "/dev/termination-log",
VolumeMounts: []apiv1.VolumeMount{
{
Name: "userfunc",
Name: fission.SharedVolumeUserfunc,
MountPath: gp.sharedMountPath,
},
{
Name: "secrets",
Name: fission.SharedVolumeSecrets,
MountPath: gp.sharedSecretPath,
},
{
Name: "config",
Name: fission.SharedVolumeConfigmaps,
MountPath: gp.sharedCfgMapPath,
},
},
@@ -567,15 +567,15 @@ func (gp *GenericPool) createPool() error {
TerminationMessagePath: "/dev/termination-log",
VolumeMounts: []apiv1.VolumeMount{
{
Name: "userfunc",
Name: fission.SharedVolumeUserfunc,
MountPath: gp.sharedMountPath,
},
{
Name: "secrets",
Name: fission.SharedVolumeSecrets,
MountPath: gp.sharedSecretPath,
},
{
Name: "config",
Name: fission.SharedVolumeConfigmaps,
MountPath: gp.sharedCfgMapPath,
},
},