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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user