Skip to content

Commit

Permalink
Fix: persistent home volume name should not use capital letters
Browse files Browse the repository at this point in the history
Fix devfile#1200

Signed-off-by: Andrew Obuchowicz <[email protected]>
  • Loading branch information
AObuchow committed Nov 23, 2023
1 parent 093bb40 commit 1a818a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const (

HomeUserDirectory = "/home/user/"

HomeVolumeName = "persistentHome"
HomeVolumeName = "persistent-home"

ServiceAccount = "devworkspace"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ output:
volumeMounts:
- name: my-defined-volume
path: /my-defined-volume-path
- name: persistentHome
- name: persistent-home
path: /home/user/
- name: my-defined-volume
volume: {}
- name: persistentHome
- name: persistent-home
volume: {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Does not create persistent home volume if a volume already named 'persistentHome'"
name: "Does not create persistent home volume if a volume is already named 'persistent-home'"

input:
devworkspaceId: "test-workspaceid"
Expand All @@ -14,7 +14,7 @@ input:
volumeMounts:
- name: my-defined-volume
path: /my-defined-volume-path
- name: persistentHome
- name: persistent-home
path: /some/path
- name: testing-container-2
container:
Expand All @@ -24,11 +24,11 @@ input:
path: /my-defined-volume-path
- name: my-defined-volume
volume: {}
- name: persistentHome
- name: persistent-home
volume: {}

output:
error: "addition of persistentHome volume would render DevWorkspace invalid: 1 error occurred:\n\t* duplicate key: persistentHome\n\n"
error: "addition of persistent-home volume would render DevWorkspace invalid: 1 error occurred:\n\t* duplicate key: persistent-home\n\n"
workspace:
components:
- name: testing-container-1
Expand All @@ -37,7 +37,7 @@ output:
volumeMounts:
- name: my-defined-volume
path: /my-defined-volume-path
- name: persistentHome
- name: persistent-home
path: /some/path
- name: testing-container-2
container:
Expand All @@ -47,5 +47,5 @@ output:
path: /my-defined-volume-path
- name: my-defined-volume
volume: {}
- name: persistentHome
- name: persistent-home
volume: {}

0 comments on commit 1a818a3

Please sign in to comment.