Merge pull request #84748 from hvaara/fix-golint-controller-volume-persistentvolume-options

Fix golint issues in pkg/controller/volume/persistentvolume/options
This commit is contained in:
Kubernetes Prow Robot 2019-11-07 04:35:53 -08:00 committed by GitHub
commit 1183771545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -103,7 +103,6 @@ pkg/controller/volume/events
pkg/controller/volume/expand
pkg/controller/volume/persistentvolume
pkg/controller/volume/persistentvolume/config/v1alpha1
pkg/controller/volume/persistentvolume/options
pkg/credentialprovider
pkg/features
pkg/kubeapiserver

View File

@ -38,11 +38,14 @@ type VolumeConfigFlags struct {
EnableDynamicProvisioning bool
}
// PersistentVolumeControllerOptions holds the PersistentVolumeController options.
type PersistentVolumeControllerOptions struct {
PVClaimBinderSyncPeriod time.Duration
VolumeConfigFlags VolumeConfigFlags
}
// NewPersistentVolumeControllerOptions creates a new PersistentVolumeControllerOptions with
// default values.
func NewPersistentVolumeControllerOptions() PersistentVolumeControllerOptions {
return PersistentVolumeControllerOptions{
PVClaimBinderSyncPeriod: 15 * time.Second,
@ -59,6 +62,7 @@ func NewPersistentVolumeControllerOptions() PersistentVolumeControllerOptions {
}
}
// AddFlags adds flags related to PersistentVolumeControllerOptions to the specified FlagSet.
func (o *PersistentVolumeControllerOptions) AddFlags(fs *pflag.FlagSet) {
fs.DurationVar(&o.PVClaimBinderSyncPeriod, "pvclaimbinder-sync-period", o.PVClaimBinderSyncPeriod,
"The period for syncing persistent volumes and persistent volume claims")