Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open
kubernetes-ghost
Commits
603c0371
Commit
603c0371
authored
Oct 08, 2020
by
Arie Peterson
🐚
Browse files
Rename driver command functions
parent
df6a94f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
driver/src/driver.sh
View file @
603c0371
...
...
@@ -321,8 +321,9 @@ deleteMapping() {
popd
>
/dev/null
}
# Program entrypoint that is called by Kubernetes to attach and mount a disk.
domount
()
{
# Program part that is performed when the program is called by Kubernetes to
# attach and mount a disk.
mountAction
()
{
debug
"domount
$@
"
local
mountPoint
=
$1
local
options
=
$2
...
...
@@ -388,7 +389,9 @@ domount() {
exit
0
}
unmount
()
{
# Program part that is performed when the program is called by Kubernetes to
# unmount and detach a disk.
unmountAction
()
{
debug
"unmount
$@
"
local
mountPoint
=
$1
...
...
@@ -435,22 +438,19 @@ unmount() {
# This is the command Kubernetes wants us to perform.
op
=
$1
if
[[
"
$op
"
=
"init"
]]
then
debug
"init
$@
"
echo
"{
\"
status
\"
:
\"
Success
\"
,
\"
capabilities
\"
:{
\"
attach
\"
:false}}"
>
&1
exit
0
fi
shift
case
"
$op
"
in
init
)
debug
"init"
echo
"{
\"
status
\"
:
\"
Success
\"
,
\"
capabilities
\"
:{
\"
attach
\"
:false}}"
>
&1
exit
0
;;
mount
)
do
mount
$*
mount
Action
$*
;;
unmount
)
unmount
$*
unmount
Action
$*
;;
*
)
debug
"not supported:
$op
$*
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment