mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
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:
parent
855f9080d1
commit
4a649fe17f
@ -46,7 +46,7 @@ const (
|
||||
pollTime = 60 // seconds
|
||||
probeTimeout = 3 // seconds
|
||||
|
||||
// use default namespace if namespace is not set
|
||||
// use default namespace if namespace is not set.
|
||||
defaultNS = "default"
|
||||
)
|
||||
|
||||
|
@ -9,14 +9,14 @@ import (
|
||||
|
||||
// #nosec because of the word `Secret`
|
||||
const (
|
||||
// ceph user names
|
||||
// ceph user names.
|
||||
keyringRBDProvisionerUsername = "cephcsi-rbd-provisioner"
|
||||
keyringRBDNodePluginUsername = "cephcsi-rbd-node"
|
||||
keyringRBDNamespaceProvisionerUsername = "cephcsi-rbd-ns-provisioner"
|
||||
keyringRBDNamespaceNodePluginUsername = "cephcsi-rbd-ns-node"
|
||||
keyringCephFSProvisionerUsername = "cephcsi-cephfs-provisioner"
|
||||
keyringCephFSNodePluginUsername = "cephcsi-cephfs-node"
|
||||
// secret names
|
||||
// secret names.
|
||||
rbdNodePluginSecretName = "cephcsi-rbd-node"
|
||||
rbdProvisionerSecretName = "cephcsi-rbd-provisioner"
|
||||
rbdNamespaceNodePluginSecretName = "cephcsi-rbd-ns-node"
|
||||
|
@ -30,7 +30,7 @@ var (
|
||||
rbdDeploymentName = "csi-rbdplugin-provisioner"
|
||||
rbdDaemonsetName = "csi-rbdplugin"
|
||||
defaultRBDPool = "replicapool"
|
||||
// Topology related variables
|
||||
// Topology related variables.
|
||||
nodeRegionLabel = "test.failure-domain/region"
|
||||
regionValue = "testregion"
|
||||
nodeZoneLabel = "test.failure-domain/zone"
|
||||
@ -40,7 +40,7 @@ var (
|
||||
rbdTopologyPool = "newrbdpool"
|
||||
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"
|
||||
appPath = rbdExamplePath + "pod.yaml"
|
||||
rawPvcPath = rbdExamplePath + "raw-block-pvc.yaml"
|
||||
|
@ -35,7 +35,7 @@ const (
|
||||
retainPolicy = v1.PersistentVolumeReclaimRetain
|
||||
// deletePolicy is the default policy in E2E.
|
||||
deletePolicy = v1.PersistentVolumeReclaimDelete
|
||||
// Default key and label for Listoptions
|
||||
// Default key and label for Listoptions.
|
||||
appKey = "app"
|
||||
appLabel = "write-data-in-pod"
|
||||
|
||||
@ -43,7 +43,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
// cli flags
|
||||
// cli flags.
|
||||
deployTimeout int
|
||||
deployCephFS bool
|
||||
deployRBD bool
|
||||
|
@ -25,10 +25,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// volIDVersion is the version number of volume ID encoding scheme
|
||||
// volIDVersion is the version number of volume ID encoding scheme.
|
||||
volIDVersion uint16 = 1
|
||||
|
||||
// RADOS namespace to store CSI specific objects and keys
|
||||
// RADOS namespace to store CSI specific objects and keys.
|
||||
radosNamespace = "csi"
|
||||
)
|
||||
|
||||
@ -43,15 +43,15 @@ type Driver struct {
|
||||
|
||||
var (
|
||||
// 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"
|
||||
|
||||
// volJournal is used to maintain RADOS based journals for CO generated
|
||||
// VolumeName to backing CephFS subvolumes
|
||||
// VolumeName to backing CephFS subvolumes.
|
||||
volJournal *journal.Config
|
||||
|
||||
// snapJournal is used to maintain RADOS based journals for CO generated
|
||||
// SnapshotName to backing CephFS subvolumes
|
||||
// SnapshotName to backing CephFS subvolumes.
|
||||
snapJournal *journal.Config
|
||||
)
|
||||
|
||||
|
@ -27,13 +27,13 @@ const (
|
||||
)
|
||||
|
||||
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")
|
||||
|
||||
// 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")
|
||||
|
||||
// ErrInvalidClone is returned when the clone state is invalid
|
||||
// ErrInvalidClone is returned when the clone state is invalid.
|
||||
ErrInvalidClone = errors.New("invalid clone state")
|
||||
|
||||
// ErrCloneFailed is returned when the clone state is failed.
|
||||
@ -46,7 +46,7 @@ var (
|
||||
// statically provisioned.
|
||||
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")
|
||||
|
||||
// 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 = 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")
|
||||
|
||||
// ErrVolumeHasSnapshots is returned when a subvolume has snapshots.
|
||||
|
@ -39,7 +39,7 @@ const (
|
||||
var (
|
||||
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)
|
||||
fusePidMapMtx sync.Mutex
|
||||
|
||||
|
@ -26,7 +26,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// volIDVersion is the version number of volume ID encoding scheme
|
||||
// volIDVersion is the version number of volume ID encoding scheme.
|
||||
volIDVersion uint16 = 1
|
||||
)
|
||||
|
||||
@ -43,19 +43,19 @@ type Driver struct {
|
||||
var (
|
||||
|
||||
// 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"
|
||||
|
||||
// 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
|
||||
snapJournal *journal.Config
|
||||
// rbdHardMaxCloneDepth is the hard limit for maximum number of nested volume clones that are taken before a flatten
|
||||
// occurs
|
||||
// occurs.
|
||||
rbdHardMaxCloneDepth uint
|
||||
|
||||
// rbdSoftMaxCloneDepth is the soft limit for maximum number of nested volume clones that are taken before a flatten
|
||||
// occurs
|
||||
// occurs.
|
||||
rbdSoftMaxCloneDepth uint
|
||||
maxSnapshotsOnImage uint
|
||||
minSnapshotsOnImageToStartFlatten uint
|
||||
|
@ -49,10 +49,10 @@ const (
|
||||
// rbdImageRequiresEncryption has been deprecated, it is used only for
|
||||
// volumes that have been created with an old provisioner, were never
|
||||
// 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")
|
||||
|
||||
// image metadata key for encryption
|
||||
// image metadata key for encryption.
|
||||
encryptionMetaKey = ".rbd.csi.ceph.com/encrypted"
|
||||
|
||||
// metadataDEK is the key in the image metadata where the (encrypted)
|
||||
|
@ -61,7 +61,7 @@ type stageTransaction struct {
|
||||
}
|
||||
|
||||
const (
|
||||
// values for xfsHasReflink
|
||||
// values for xfsHasReflink.
|
||||
xfsReflinkUnset int = iota
|
||||
xfsReflinkNoSupport
|
||||
xfsReflinkSupport
|
||||
@ -92,7 +92,7 @@ var (
|
||||
}
|
||||
|
||||
// xfsHasReflink is set by xfsSupportsReflink(), use the function when
|
||||
// checking the support for reflink
|
||||
// checking the support for reflink.
|
||||
xfsHasReflink = xfsReflinkUnset
|
||||
)
|
||||
|
||||
|
@ -43,7 +43,7 @@ const (
|
||||
// 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.
|
||||
// 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"
|
||||
rbdUnmapCmdNbdMissingMap = "rbd-nbd: %s is not mapped"
|
||||
rbdMapConnectionTimeout = "Connection timed out"
|
||||
|
@ -51,9 +51,9 @@ const (
|
||||
//
|
||||
// #nosec:G101, no hardcoded secrets, only configuration keys.
|
||||
awsAccessKey = "AWS_ACCESS_KEY_ID"
|
||||
// #nosec:G101
|
||||
// #nosec:G101.
|
||||
awsSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
|
||||
// #nosec:G101
|
||||
// #nosec:G101.
|
||||
awsSessionToken = "AWS_SESSION_TOKEN"
|
||||
awsCMK = "AWS_CMK_ARN"
|
||||
)
|
||||
|
@ -37,7 +37,7 @@ fuse_big_writes = true
|
||||
|
||||
const (
|
||||
cephConfigRoot = "/etc/ceph"
|
||||
// CephConfigPath ceph configuration file
|
||||
// CephConfigPath ceph configuration file.
|
||||
CephConfigPath = "/etc/ceph/ceph.conf"
|
||||
|
||||
keyRing = "/etc/ceph/keyring"
|
||||
|
@ -40,7 +40,7 @@ type ClusterConnection struct {
|
||||
var (
|
||||
// large interval and timeout, it should be longer than the maximum
|
||||
// time an operation can take (until refcounting of the connections is
|
||||
// available)
|
||||
// available).
|
||||
cpInterval = 15 * time.Minute
|
||||
cpExpiry = 10 * time.Minute
|
||||
connPool = NewConnPool(cpInterval, cpExpiry)
|
||||
|
@ -31,7 +31,7 @@ const (
|
||||
mapperFilePrefix = "luks-rbd-"
|
||||
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"
|
||||
|
||||
// Passphrase size - 20 bytes is 160 bits to satisfy:
|
||||
|
@ -29,7 +29,7 @@ const (
|
||||
// This was hardcoded once and defaults to the old value to keep backward compatibility.
|
||||
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"
|
||||
)
|
||||
|
||||
|
@ -21,10 +21,10 @@ import (
|
||||
)
|
||||
|
||||
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"
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
|
@ -35,14 +35,14 @@ const (
|
||||
// options.
|
||||
kmsTypeKey = "encryptionKMSType"
|
||||
|
||||
// podNamespaceEnv ENV should be set in the cephcsi container
|
||||
// podNamespaceEnv ENV should be set in the cephcsi container.
|
||||
podNamespaceEnv = "POD_NAMESPACE"
|
||||
|
||||
// kmsConfigMapEnv env to read a ConfigMap by name
|
||||
// kmsConfigMapEnv env to read a ConfigMap by name.
|
||||
kmsConfigMapEnv = "KMS_CONFIGMAP_NAME"
|
||||
|
||||
// defaultKMSConfigMapName default ConfigMap name to fetch kms
|
||||
// connection details
|
||||
// connection details.
|
||||
defaultKMSConfigMapName = "csi-kms-connection-details"
|
||||
)
|
||||
|
||||
|
@ -31,10 +31,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// Encryption passphrase location in K8s secrets
|
||||
// Encryption passphrase location in K8s secrets.
|
||||
encryptionPassphraseKey = "encryptionPassphrase"
|
||||
|
||||
// Default KMS type
|
||||
// Default KMS type.
|
||||
defaultKMSType = "default"
|
||||
|
||||
// kmsTypeSecretsMetadata is the SecretsKMS with per-volume encryption,
|
||||
|
@ -57,9 +57,9 @@ func RoundOffBytes(bytes int64) int64 {
|
||||
|
||||
// variables which will be set during the build time.
|
||||
var (
|
||||
// GitCommit tell the latest git commit image is built from
|
||||
// GitCommit tell the latest git commit image is built from.
|
||||
GitCommit string
|
||||
// DriverVersion which will be driver version
|
||||
// DriverVersion which will be driver version.
|
||||
DriverVersion string
|
||||
)
|
||||
|
||||
|
@ -37,7 +37,7 @@ const (
|
||||
// #nosec
|
||||
serviceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token"
|
||||
|
||||
// vault configuration defaults
|
||||
// vault configuration defaults.
|
||||
vaultDefaultAuthPath = "/v1/auth/kubernetes/login"
|
||||
vaultDefaultRole = "csi-kubernetes"
|
||||
vaultDefaultNamespace = ""
|
||||
|
Loading…
Reference in New Issue
Block a user