Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Avoid to write in ConfigMap volume (#636)
Browse files Browse the repository at this point in the history
* Avoid to write in ConfigMap volume

* Adapt test
  • Loading branch information
andresmgot authored Mar 19, 2018
1 parent d3c362d commit 88b60ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/utils/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func getProvisionContainer(function, checksum, fileName, handler, contentType, r
checksumInfo := strings.Split(checksum, ":")
switch checksumInfo[0] {
case "sha256":
shaFile := originFile + ".sha256"
shaFile := "/tmp/func.sha256"
prepareCommand = appendToCommand(prepareCommand,
fmt.Sprintf("echo '%s %s' > %s", checksumInfo[1], originFile, shaFile),
fmt.Sprintf("sha256sum -c %s", shaFile),
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/k8sutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ func TestGetProvisionContainer(t *testing.T) {
Name: "prepare",
Image: "kubeless/unzip@sha256:f162c062973cca05459834de6ed14c039d45df8cdb76097f50b028a1621b3697",
Command: []string{"sh", "-c"},
Args: []string{"echo 'abc1234 /deps/test.func' > /deps/test.func.sha256 && sha256sum -c /deps/test.func.sha256 && cp /deps/test.func /runtime/test.py && cp /deps/requirements.txt /runtime"},
Args: []string{"echo 'abc1234 /deps/test.func' > /tmp/func.sha256 && sha256sum -c /tmp/func.sha256 && cp /deps/test.func /runtime/test.py && cp /deps/requirements.txt /runtime"},
VolumeMounts: []v1.VolumeMount{rvol, dvol},
ImagePullPolicy: v1.PullIfNotPresent,
}
Expand Down

0 comments on commit 88b60ab

Please sign in to comment.