Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Local Path Provisioner
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Local Path Provisioner
Commits
eb686d9d
Commit
eb686d9d
authored
Dec 18, 2021
by
Sung-Kyu Yoo
Committed by
Derek Su
Dec 22, 2021
Browse files
Options
Downloads
Patches
Plain Diff
Added provision/delete retry count options
parent
7353f083
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
deploy/chart/templates/deployment.yaml
+8
-0
8 additions, 0 deletions
deploy/chart/templates/deployment.yaml
deploy/chart/values.yaml
+7
-1
7 additions, 1 deletion
deploy/chart/values.yaml
main.go
+38
-24
38 additions, 24 deletions
main.go
with
53 additions
and
25 deletions
deploy/chart/templates/deployment.yaml
+
8
−
0
View file @
eb686d9d
...
@@ -51,6 +51,14 @@ spec:
...
@@ -51,6 +51,14 @@ spec:
-
--worker-threads
-
--worker-threads
-
{{
.Values.workerThreads
}}
-
{{
.Values.workerThreads
}}
{{
- end
}}
{{
- end
}}
{{
- if .Values.provisioningRetryCount
}}
-
--provisioning-retry-count
-
{{
.Values.provisioningRetryCount
}}
{{
- end
}}
{{
- if .Values.deletionRetryCount
}}
-
--deletion-retry-count
-
{{
.Values.deletionRetryCount
}}
{{
- end
}}
volumeMounts
:
volumeMounts
:
-
name
:
config-volume
-
name
:
config-volume
mountPath
:
/etc/config/
mountPath
:
/etc/config/
...
...
This diff is collapsed.
Click to expand it.
deploy/chart/values.yaml
+
7
−
1
View file @
eb686d9d
...
@@ -140,4 +140,10 @@ configmap:
...
@@ -140,4 +140,10 @@ configmap:
imagePullPolicy: IfNotPresent
imagePullPolicy: IfNotPresent
# Number of provisioner worker threads to call provision/delete simultaneously.
# Number of provisioner worker threads to call provision/delete simultaneously.
workerThreads
:
4
# workerThreads: 4
# Number of retries of failed volume provisioning. 0 means retry indefinitely.
# provisioningRetryCount: 15
# Number of retries of failed volume deletion. 0 means retry indefinitely.
# deletionRetryCount: 15
This diff is collapsed.
Click to expand it.
main.go
+
38
−
24
View file @
eb686d9d
...
@@ -40,7 +40,11 @@ var (
...
@@ -40,7 +40,11 @@ var (
FlagHelperPodFile
=
"helper-pod-file"
FlagHelperPodFile
=
"helper-pod-file"
DefaultHelperPodFile
=
"helperPod.yaml"
DefaultHelperPodFile
=
"helperPod.yaml"
FlagWorkerThreads
=
"worker-threads"
FlagWorkerThreads
=
"worker-threads"
DefaultWorkerThreads
=
4
DefaultWorkerThreads
=
pvController
.
DefaultThreadiness
FlagProvisioningRetryCount
=
"provisioning-retry-count"
DefaultProvisioningRetryCount
=
pvController
.
DefaultFailedProvisionThreshold
FlagDeletionRetryCount
=
"deletion-retry-count"
DefaultDeletionRetryCount
=
pvController
.
DefaultFailedDeleteThreshold
)
)
func
cmdNotFound
(
c
*
cli
.
Context
,
command
string
)
{
func
cmdNotFound
(
c
*
cli
.
Context
,
command
string
)
{
...
@@ -114,6 +118,16 @@ func StartCmd() cli.Command {
...
@@ -114,6 +118,16 @@ func StartCmd() cli.Command {
Usage
:
"Number of provisioner worker threads."
,
Usage
:
"Number of provisioner worker threads."
,
Value
:
DefaultWorkerThreads
,
Value
:
DefaultWorkerThreads
,
},
},
cli
.
IntFlag
{
Name
:
FlagProvisioningRetryCount
,
Usage
:
"Number of retries of failed volume provisioning. 0 means retry indefinitely."
,
Value
:
DefaultProvisioningRetryCount
,
},
cli
.
IntFlag
{
Name
:
FlagDeletionRetryCount
,
Usage
:
"Number of retries of failed volume deletion. 0 means retry indefinitely."
,
Value
:
DefaultDeletionRetryCount
,
},
},
},
Action
:
func
(
c
*
cli
.
Context
)
{
Action
:
func
(
c
*
cli
.
Context
)
{
if
err
:=
startDaemon
(
c
);
err
!=
nil
{
if
err
:=
startDaemon
(
c
);
err
!=
nil
{
...
@@ -239,8 +253,8 @@ func startDaemon(c *cli.Context) error {
...
@@ -239,8 +253,8 @@ func startDaemon(c *cli.Context) error {
provisioner
,
provisioner
,
serverVersion
.
GitVersion
,
serverVersion
.
GitVersion
,
pvController
.
LeaderElection
(
false
),
pvController
.
LeaderElection
(
false
),
pvController
.
FailedProvisionThreshold
(
0
),
pvController
.
FailedProvisionThreshold
(
c
.
Int
(
FlagProvisioningRetryCount
)
),
pvController
.
FailedDeleteThreshold
(
0
),
pvController
.
FailedDeleteThreshold
(
c
.
Int
(
FlagDeletionRetryCount
)
),
pvController
.
Threadiness
(
c
.
Int
(
FlagWorkerThreads
)),
pvController
.
Threadiness
(
c
.
Int
(
FlagWorkerThreads
)),
)
)
logrus
.
Debug
(
"Provisioner started"
)
logrus
.
Debug
(
"Provisioner started"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment