-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Able to clean filesystem volume with job #863
Conversation
local-volume/provisioner/cmd/main.go
Outdated
) | ||
|
||
func main() { | ||
rand.Seed(time.Now().UTC().UnixNano()) | ||
flag.StringVar(&optListenAddress, "listen-address", ":8080", "address on which to expose metrics") | ||
flag.StringVar(&optMetricsPath, "metrics-path", "/metrics", "path under which to expose metrics") | ||
flag.StringVar(&optDeleteContents, "delete-contents", "", "delete contents in directory") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is kind of confusing to reuse the same process to do a different function. Can we create a new util binary for this? Or can the job just use a shell command to do the deletion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use shell script, see https://github.com/kubernetes-incubator/external-storage/pull/863/files#diff-ba78747a8f5a1366cfa9a5c8bb9b77a2.
@@ -46,8 +46,8 @@ const ( | |||
PVLabel = "pv" | |||
// PVUuidLabel is the label name whose value is the pv uuid. | |||
PVUuidLabel = "pvuuid" | |||
// DeviceAnnotation is the annotation that specifies the device path. | |||
DeviceAnnotation = "device" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this could break any monitoring/logging built on top of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted.
I updated it because the name is a bit confusing now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is a little confusing now. Would it make sense to have a new annotation for the filesystem case?
/lgtm |
Fixes #737.
Add(use-delete-contents
flag to delete contents in directory/scripts/fsclean.sh
script now)Rename DeviceAnnotation ("device") to VolumePathAnnotation ("volume-path")useJobForCleaning
is trueDiscussion: