Skip to content

Commit

Permalink
Add test for decimal value + more doc
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Apr 21, 2023
1 parent a4f5f46 commit ece4079
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Mounting resources can be additionally configured via annotations:

- `devfile.io/read-only`: for persistent volume claims, mount the resource as read-only

- `devfile.io/mount-access-mode`: for secret/configmap, can be used to configure file permissions on mounted files
- `devfile.io/mount-access-mode`: for secret/configmap, can be used to configure file permissions on mounted files. The value can be in octal notation between `0000` and `0777` (for example `0400`), or in decimal notation between `0` and `511`. The default value is `0644` in octal (`420` in decimal)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: automount-access-mode-configmap-decimal
labels:
devfile.io/auto-mount: "true"
annotations:
devfile.io/mount-access-mode: "292"
data:
config292: foo-decimal
5 changes: 5 additions & 0 deletions tests/integration/cmd_dev_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ ComponentSettings:
"/mnt/mount-path/secret",

"/etc/config/automount-access-mode-configmap",
"/etc/config/automount-access-mode-configmap-decimal",
"/etc/secret/automount-access-mode-secret",
} {
var output string
Expand Down Expand Up @@ -715,6 +716,10 @@ ComponentSettings:
content: "foo",
accessMode: "r--r--r--",
},
"/etc/config/automount-access-mode-configmap-decimal/config292": {
content: "foo-decimal",
accessMode: "r--r--r--",
},
"/etc/secret/automount-access-mode-secret/secret0444": {
content: "1234",
accessMode: "r--r--r--",
Expand Down

0 comments on commit ece4079

Please sign in to comment.