cleanup: resolve godot linter

This commit resolves godot linter issue
which says "Comment should end in a period (godot)".

Updates: #1586

Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
Yati Padia 2021-07-08 20:29:34 +05:30 committed by mergify[bot]
parent 855f9080d1
commit 4a649fe17f
21 changed files with 44 additions and 44 deletions

View File

@ -46,7 +46,7 @@ const (
pollTime = 60 // seconds pollTime = 60 // seconds
probeTimeout = 3 // seconds probeTimeout = 3 // seconds
// use default namespace if namespace is not set // use default namespace if namespace is not set.
defaultNS = "default" defaultNS = "default"
) )

View File

@ -9,14 +9,14 @@ import (
// #nosec because of the word `Secret` // #nosec because of the word `Secret`
const ( const (
// ceph user names // ceph user names.
keyringRBDProvisionerUsername = "cephcsi-rbd-provisioner" keyringRBDProvisionerUsername = "cephcsi-rbd-provisioner"
keyringRBDNodePluginUsername = "cephcsi-rbd-node" keyringRBDNodePluginUsername = "cephcsi-rbd-node"
keyringRBDNamespaceProvisionerUsername = "cephcsi-rbd-ns-provisioner" keyringRBDNamespaceProvisionerUsername = "cephcsi-rbd-ns-provisioner"
keyringRBDNamespaceNodePluginUsername = "cephcsi-rbd-ns-node" keyringRBDNamespaceNodePluginUsername = "cephcsi-rbd-ns-node"
keyringCephFSProvisionerUsername = "cephcsi-cephfs-provisioner" keyringCephFSProvisionerUsername = "cephcsi-cephfs-provisioner"
keyringCephFSNodePluginUsername = "cephcsi-cephfs-node" keyringCephFSNodePluginUsername = "cephcsi-cephfs-node"
// secret names // secret names.
rbdNodePluginSecretName = "cephcsi-rbd-node" rbdNodePluginSecretName = "cephcsi-rbd-node"
rbdProvisionerSecretName = "cephcsi-rbd-provisioner" rbdProvisionerSecretName = "cephcsi-rbd-provisioner"
rbdNamespaceNodePluginSecretName = "cephcsi-rbd-ns-node" rbdNamespaceNodePluginSecretName = "cephcsi-rbd-ns-node"

View File

@ -30,7 +30,7 @@ var (
rbdDeploymentName = "csi-rbdplugin-provisioner" rbdDeploymentName = "csi-rbdplugin-provisioner"
rbdDaemonsetName = "csi-rbdplugin" rbdDaemonsetName = "csi-rbdplugin"
defaultRBDPool = "replicapool" defaultRBDPool = "replicapool"
// Topology related variables // Topology related variables.
nodeRegionLabel = "test.failure-domain/region" nodeRegionLabel = "test.failure-domain/region"
regionValue = "testregion" regionValue = "testregion"
nodeZoneLabel = "test.failure-domain/zone" nodeZoneLabel = "test.failure-domain/zone"
@ -40,7 +40,7 @@ var (
rbdTopologyPool = "newrbdpool" rbdTopologyPool = "newrbdpool"
rbdTopologyDataPool = "replicapool" // NOTE: should be different than rbdTopologyPool for test to be effective rbdTopologyDataPool = "replicapool" // NOTE: should be different than rbdTopologyPool for test to be effective
// yaml files required for deployment // yaml files required for deployment.
pvcPath = rbdExamplePath + "pvc.yaml" pvcPath = rbdExamplePath + "pvc.yaml"
appPath = rbdExamplePath + "pod.yaml" appPath = rbdExamplePath + "pod.yaml"
rawPvcPath = rbdExamplePath + "raw-block-pvc.yaml" rawPvcPath = rbdExamplePath + "raw-block-pvc.yaml"

View File

@ -35,7 +35,7 @@ const (
retainPolicy = v1.PersistentVolumeReclaimRetain retainPolicy = v1.PersistentVolumeReclaimRetain
// deletePolicy is the default policy in E2E. // deletePolicy is the default policy in E2E.
deletePolicy = v1.PersistentVolumeReclaimDelete deletePolicy = v1.PersistentVolumeReclaimDelete
// Default key and label for Listoptions // Default key and label for Listoptions.
appKey = "app" appKey = "app"
appLabel = "write-data-in-pod" appLabel = "write-data-in-pod"
@ -43,7 +43,7 @@ const (
) )
var ( var (
// cli flags // cli flags.
deployTimeout int deployTimeout int
deployCephFS bool deployCephFS bool
deployRBD bool deployRBD bool

View File

@ -25,10 +25,10 @@ import (
) )
const ( const (
// volIDVersion is the version number of volume ID encoding scheme // volIDVersion is the version number of volume ID encoding scheme.
volIDVersion uint16 = 1 volIDVersion uint16 = 1
// RADOS namespace to store CSI specific objects and keys // RADOS namespace to store CSI specific objects and keys.
radosNamespace = "csi" radosNamespace = "csi"
) )
@ -43,15 +43,15 @@ type Driver struct {
var ( var (
// CSIInstanceID is the instance ID that is unique to an instance of CSI, used when sharing // CSIInstanceID is the instance ID that is unique to an instance of CSI, used when sharing
// ceph clusters across CSI instances, to differentiate omap names per CSI instance // ceph clusters across CSI instances, to differentiate omap names per CSI instance.
CSIInstanceID = "default" CSIInstanceID = "default"
// volJournal is used to maintain RADOS based journals for CO generated // volJournal is used to maintain RADOS based journals for CO generated
// VolumeName to backing CephFS subvolumes // VolumeName to backing CephFS subvolumes.
volJournal *journal.Config volJournal *journal.Config
// snapJournal is used to maintain RADOS based journals for CO generated // snapJournal is used to maintain RADOS based journals for CO generated
// SnapshotName to backing CephFS subvolumes // SnapshotName to backing CephFS subvolumes.
snapJournal *journal.Config snapJournal *journal.Config
) )

View File

@ -27,13 +27,13 @@ const (
) )
var ( var (
// ErrCloneInProgress is returned when snapshot clone state is `in progress` // ErrCloneInProgress is returned when snapshot clone state is `in progress`.
ErrCloneInProgress = errors.New("clone from snapshot is already in progress") ErrCloneInProgress = errors.New("clone from snapshot is already in progress")
// ErrClonePending is returned when snapshot clone state is `pending` // ErrClonePending is returned when snapshot clone state is `pending`.
ErrClonePending = errors.New("clone from snapshot is pending") ErrClonePending = errors.New("clone from snapshot is pending")
// ErrInvalidClone is returned when the clone state is invalid // ErrInvalidClone is returned when the clone state is invalid.
ErrInvalidClone = errors.New("invalid clone state") ErrInvalidClone = errors.New("invalid clone state")
// ErrCloneFailed is returned when the clone state is failed. // ErrCloneFailed is returned when the clone state is failed.
@ -46,7 +46,7 @@ var (
// statically provisioned. // statically provisioned.
ErrNonStaticVolume = errors.New("volume not static") ErrNonStaticVolume = errors.New("volume not static")
// ErrSnapProtectionExist is returned when the snapshot is already protected // ErrSnapProtectionExist is returned when the snapshot is already protected.
ErrSnapProtectionExist = errors.New("snapshot protection already exists") ErrSnapProtectionExist = errors.New("snapshot protection already exists")
// ErrSnapNotFound is returned when snap name passed is not found in the list // ErrSnapNotFound is returned when snap name passed is not found in the list
@ -56,7 +56,7 @@ var (
// ErrVolumeNotFound is returned when a subvolume is not found in CephFS. // ErrVolumeNotFound is returned when a subvolume is not found in CephFS.
ErrVolumeNotFound = errors.New("volume not found") ErrVolumeNotFound = errors.New("volume not found")
// ErrInvalidCommand is returned when a command is not known to the cluster // ErrInvalidCommand is returned when a command is not known to the cluster.
ErrInvalidCommand = errors.New("invalid command") ErrInvalidCommand = errors.New("invalid command")
// ErrVolumeHasSnapshots is returned when a subvolume has snapshots. // ErrVolumeHasSnapshots is returned when a subvolume has snapshots.

View File

@ -39,7 +39,7 @@ const (
var ( var (
availableMounters []string availableMounters []string
// maps a mountpoint to PID of its FUSE daemon // maps a mountpoint to PID of its FUSE daemon.
fusePidMap = make(map[string]int) fusePidMap = make(map[string]int)
fusePidMapMtx sync.Mutex fusePidMapMtx sync.Mutex

View File

@ -26,7 +26,7 @@ import (
) )
const ( const (
// volIDVersion is the version number of volume ID encoding scheme // volIDVersion is the version number of volume ID encoding scheme.
volIDVersion uint16 = 1 volIDVersion uint16 = 1
) )
@ -43,19 +43,19 @@ type Driver struct {
var ( var (
// CSIInstanceID is the instance ID that is unique to an instance of CSI, used when sharing // CSIInstanceID is the instance ID that is unique to an instance of CSI, used when sharing
// ceph clusters across CSI instances, to differentiate omap names per CSI instance // ceph clusters across CSI instances, to differentiate omap names per CSI instance.
CSIInstanceID = "default" CSIInstanceID = "default"
// volJournal and snapJournal are used to maintain RADOS based journals for CO generated // volJournal and snapJournal are used to maintain RADOS based journals for CO generated
// VolumeName to backing RBD images // VolumeName to backing RBD images.
volJournal *journal.Config volJournal *journal.Config
snapJournal *journal.Config snapJournal *journal.Config
// rbdHardMaxCloneDepth is the hard limit for maximum number of nested volume clones that are taken before a flatten // rbdHardMaxCloneDepth is the hard limit for maximum number of nested volume clones that are taken before a flatten
// occurs // occurs.
rbdHardMaxCloneDepth uint rbdHardMaxCloneDepth uint
// rbdSoftMaxCloneDepth is the soft limit for maximum number of nested volume clones that are taken before a flatten // rbdSoftMaxCloneDepth is the soft limit for maximum number of nested volume clones that are taken before a flatten
// occurs // occurs.
rbdSoftMaxCloneDepth uint rbdSoftMaxCloneDepth uint
maxSnapshotsOnImage uint maxSnapshotsOnImage uint
minSnapshotsOnImageToStartFlatten uint minSnapshotsOnImageToStartFlatten uint

View File

@ -49,10 +49,10 @@ const (
// rbdImageRequiresEncryption has been deprecated, it is used only for // rbdImageRequiresEncryption has been deprecated, it is used only for
// volumes that have been created with an old provisioner, were never // volumes that have been created with an old provisioner, were never
// attached/mounted and now get staged by a new node-plugin // attached/mounted and now get staged by a new node-plugin
// TODO: remove this backwards compatibility support // TODO: remove this backwards compatibility support.
rbdImageRequiresEncryption = rbdEncryptionState("requiresEncryption") rbdImageRequiresEncryption = rbdEncryptionState("requiresEncryption")
// image metadata key for encryption // image metadata key for encryption.
encryptionMetaKey = ".rbd.csi.ceph.com/encrypted" encryptionMetaKey = ".rbd.csi.ceph.com/encrypted"
// metadataDEK is the key in the image metadata where the (encrypted) // metadataDEK is the key in the image metadata where the (encrypted)

View File

@ -61,7 +61,7 @@ type stageTransaction struct {
} }
const ( const (
// values for xfsHasReflink // values for xfsHasReflink.
xfsReflinkUnset int = iota xfsReflinkUnset int = iota
xfsReflinkNoSupport xfsReflinkNoSupport
xfsReflinkSupport xfsReflinkSupport
@ -92,7 +92,7 @@ var (
} }
// xfsHasReflink is set by xfsSupportsReflink(), use the function when // xfsHasReflink is set by xfsSupportsReflink(), use the function when
// checking the support for reflink // checking the support for reflink.
xfsHasReflink = xfsReflinkUnset xfsHasReflink = xfsReflinkUnset
) )

View File

@ -43,7 +43,7 @@ const (
// Output strings returned during invocation of "rbd unmap --device-type... <imageSpec>" when // Output strings returned during invocation of "rbd unmap --device-type... <imageSpec>" when
// image is not found to be mapped. Used to ignore errors when attempting to unmap such images. // image is not found to be mapped. Used to ignore errors when attempting to unmap such images.
// The %s format specifier should contain the <imageSpec> string // The %s format specifier should contain the <imageSpec> string
// NOTE: When using devicePath instead of imageSpec, the error strings are different // NOTE: When using devicePath instead of imageSpec, the error strings are different.
rbdUnmapCmdkRbdMissingMap = "rbd: %s: not a mapped image or snapshot" rbdUnmapCmdkRbdMissingMap = "rbd: %s: not a mapped image or snapshot"
rbdUnmapCmdNbdMissingMap = "rbd-nbd: %s is not mapped" rbdUnmapCmdNbdMissingMap = "rbd-nbd: %s is not mapped"
rbdMapConnectionTimeout = "Connection timed out" rbdMapConnectionTimeout = "Connection timed out"

View File

@ -51,9 +51,9 @@ const (
// //
// #nosec:G101, no hardcoded secrets, only configuration keys. // #nosec:G101, no hardcoded secrets, only configuration keys.
awsAccessKey = "AWS_ACCESS_KEY_ID" awsAccessKey = "AWS_ACCESS_KEY_ID"
// #nosec:G101 // #nosec:G101.
awsSecretAccessKey = "AWS_SECRET_ACCESS_KEY" awsSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
// #nosec:G101 // #nosec:G101.
awsSessionToken = "AWS_SESSION_TOKEN" awsSessionToken = "AWS_SESSION_TOKEN"
awsCMK = "AWS_CMK_ARN" awsCMK = "AWS_CMK_ARN"
) )

View File

@ -37,7 +37,7 @@ fuse_big_writes = true
const ( const (
cephConfigRoot = "/etc/ceph" cephConfigRoot = "/etc/ceph"
// CephConfigPath ceph configuration file // CephConfigPath ceph configuration file.
CephConfigPath = "/etc/ceph/ceph.conf" CephConfigPath = "/etc/ceph/ceph.conf"
keyRing = "/etc/ceph/keyring" keyRing = "/etc/ceph/keyring"

View File

@ -40,7 +40,7 @@ type ClusterConnection struct {
var ( var (
// large interval and timeout, it should be longer than the maximum // large interval and timeout, it should be longer than the maximum
// time an operation can take (until refcounting of the connections is // time an operation can take (until refcounting of the connections is
// available) // available).
cpInterval = 15 * time.Minute cpInterval = 15 * time.Minute
cpExpiry = 10 * time.Minute cpExpiry = 10 * time.Minute
connPool = NewConnPool(cpInterval, cpExpiry) connPool = NewConnPool(cpInterval, cpExpiry)

View File

@ -31,7 +31,7 @@ const (
mapperFilePrefix = "luks-rbd-" mapperFilePrefix = "luks-rbd-"
mapperFilePathPrefix = "/dev/mapper" mapperFilePathPrefix = "/dev/mapper"
// kmsConfigPath is the location of the vault config file // kmsConfigPath is the location of the vault config file.
kmsConfigPath = "/etc/ceph-csi-encryption-kms-config/config.json" kmsConfigPath = "/etc/ceph-csi-encryption-kms-config/config.json"
// Passphrase size - 20 bytes is 160 bits to satisfy: // Passphrase size - 20 bytes is 160 bits to satisfy:

View File

@ -29,7 +29,7 @@ const (
// This was hardcoded once and defaults to the old value to keep backward compatibility. // This was hardcoded once and defaults to the old value to keep backward compatibility.
defaultCsiSubvolumeGroup = "csi" defaultCsiSubvolumeGroup = "csi"
// CsiConfigFile is the location of the CSI config file // CsiConfigFile is the location of the CSI config file.
CsiConfigFile = "/etc/ceph-csi-config/config.json" CsiConfigFile = "/etc/ceph-csi-config/config.json"
) )

View File

@ -21,10 +21,10 @@ import (
) )
const ( const (
// VolumeOperationAlreadyExistsFmt string format to return for concurrent operation // VolumeOperationAlreadyExistsFmt string format to return for concurrent operation.
VolumeOperationAlreadyExistsFmt = "an operation with the given Volume ID %s already exists" VolumeOperationAlreadyExistsFmt = "an operation with the given Volume ID %s already exists"
// SnapshotOperationAlreadyExistsFmt string format to return for concurrent operation // SnapshotOperationAlreadyExistsFmt string format to return for concurrent operation.
SnapshotOperationAlreadyExistsFmt = "an operation with the given Snapshot ID %s already exists" SnapshotOperationAlreadyExistsFmt = "an operation with the given Snapshot ID %s already exists"
) )

View File

@ -35,14 +35,14 @@ const (
// options. // options.
kmsTypeKey = "encryptionKMSType" kmsTypeKey = "encryptionKMSType"
// podNamespaceEnv ENV should be set in the cephcsi container // podNamespaceEnv ENV should be set in the cephcsi container.
podNamespaceEnv = "POD_NAMESPACE" podNamespaceEnv = "POD_NAMESPACE"
// kmsConfigMapEnv env to read a ConfigMap by name // kmsConfigMapEnv env to read a ConfigMap by name.
kmsConfigMapEnv = "KMS_CONFIGMAP_NAME" kmsConfigMapEnv = "KMS_CONFIGMAP_NAME"
// defaultKMSConfigMapName default ConfigMap name to fetch kms // defaultKMSConfigMapName default ConfigMap name to fetch kms
// connection details // connection details.
defaultKMSConfigMapName = "csi-kms-connection-details" defaultKMSConfigMapName = "csi-kms-connection-details"
) )

View File

@ -31,10 +31,10 @@ import (
) )
const ( const (
// Encryption passphrase location in K8s secrets // Encryption passphrase location in K8s secrets.
encryptionPassphraseKey = "encryptionPassphrase" encryptionPassphraseKey = "encryptionPassphrase"
// Default KMS type // Default KMS type.
defaultKMSType = "default" defaultKMSType = "default"
// kmsTypeSecretsMetadata is the SecretsKMS with per-volume encryption, // kmsTypeSecretsMetadata is the SecretsKMS with per-volume encryption,

View File

@ -57,9 +57,9 @@ func RoundOffBytes(bytes int64) int64 {
// variables which will be set during the build time. // variables which will be set during the build time.
var ( var (
// GitCommit tell the latest git commit image is built from // GitCommit tell the latest git commit image is built from.
GitCommit string GitCommit string
// DriverVersion which will be driver version // DriverVersion which will be driver version.
DriverVersion string DriverVersion string
) )

View File

@ -37,7 +37,7 @@ const (
// #nosec // #nosec
serviceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" serviceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token"
// vault configuration defaults // vault configuration defaults.
vaultDefaultAuthPath = "/v1/auth/kubernetes/login" vaultDefaultAuthPath = "/v1/auth/kubernetes/login"
vaultDefaultRole = "csi-kubernetes" vaultDefaultRole = "csi-kubernetes"
vaultDefaultNamespace = "" vaultDefaultNamespace = ""