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
+31 -3
View File
@@ -478,7 +478,19 @@ func (envw *environmentWatcher) createBuilderDeployment(env *crd.Environment) (*
Spec: apiv1.PodSpec{
Volumes: []apiv1.Volume{
{
Name: "package",
Name: fission.SharedVolumePackages,
VolumeSource: apiv1.VolumeSource{
EmptyDir: &apiv1.EmptyDirVolumeSource{},
},
},
{
Name: fission.SharedVolumeSecrets,
VolumeSource: apiv1.VolumeSource{
EmptyDir: &apiv1.EmptyDirVolumeSource{},
},
},
{
Name: fission.SharedVolumeConfigmaps,
VolumeSource: apiv1.VolumeSource{
EmptyDir: &apiv1.EmptyDirVolumeSource{},
},
@@ -492,9 +504,17 @@ func (envw *environmentWatcher) createBuilderDeployment(env *crd.Environment) (*
TerminationMessagePath: "/dev/termination-log",
VolumeMounts: []apiv1.VolumeMount{
{
Name: "package",
Name: fission.SharedVolumePackages,
MountPath: sharedMountPath,
},
{
Name: fission.SharedVolumeSecrets,
MountPath: sharedSecretPath,
},
{
Name: fission.SharedVolumeConfigmaps,
MountPath: sharedCfgMapPath,
},
},
Command: []string{"/builder", sharedMountPath},
ReadinessProbe: &apiv1.Probe{
@@ -518,9 +538,17 @@ func (envw *environmentWatcher) createBuilderDeployment(env *crd.Environment) (*
TerminationMessagePath: "/dev/termination-log",
VolumeMounts: []apiv1.VolumeMount{
{
Name: "package",
Name: fission.SharedVolumePackages,
MountPath: sharedMountPath,
},
{
Name: fission.SharedVolumeSecrets,
MountPath: sharedSecretPath,
},
{
Name: fission.SharedVolumeConfigmaps,
MountPath: sharedCfgMapPath,
},
},
Command: []string{"/fetcher",
"-secret-dir", sharedSecretPath,