Added a flag to control the extraction of archive based on user input (#675)

For certain environments, the archive should not be extracted and kept as it is (For ex. for Java the jar file should not be extracted). This change enables an environment level flag to control this behaviour.
This commit is contained in:
Vishal
2018-06-14 12:32:40 +05:30
committed by GitHub
parent 6d08e6e0bc
commit 1b86c367a0
7 changed files with 35 additions and 20 deletions
+4 -3
View File
@@ -158,9 +158,10 @@ func (deploy *NewDeploy) getDeploymentSpec(fn *crd.Function, env *crd.Environmen
Namespace: fn.Spec.Package.PackageRef.Namespace,
Name: fn.Spec.Package.PackageRef.Name,
},
Filename: targetFilename,
Secrets: fn.Spec.Secrets,
ConfigMaps: fn.Spec.ConfigMaps,
Filename: targetFilename,
Secrets: fn.Spec.Secrets,
ConfigMaps: fn.Spec.ConfigMaps,
ExtractArchive: env.Spec.ExtractArchive,
}
loadReq := fission.FunctionLoadRequest{
+4 -3
View File
@@ -387,9 +387,10 @@ func (gp *GenericPool) specializePod(pod *apiv1.Pod, metadata *metav1.ObjectMeta
Namespace: fn.Spec.Package.PackageRef.Namespace,
Name: fn.Spec.Package.PackageRef.Name,
},
Filename: targetFilename,
Secrets: fn.Spec.Secrets,
ConfigMaps: fn.Spec.ConfigMaps,
Filename: targetFilename,
Secrets: fn.Spec.Secrets,
ConfigMaps: fn.Spec.ConfigMaps,
ExtractArchive: gp.env.Spec.ExtractArchive,
})
if err != nil {
return err