This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
/
config.go
61 lines (51 loc) · 2.25 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright 2019 NetApp, Inc. All Rights Reserved.
package kubernetes
import (
"time"
"github.com/netapp/trident/config"
csiConfig "github.com/netapp/trident/frontend/csi"
"github.com/netapp/trident/frontend/csi/helpers"
"github.com/netapp/trident/utils"
)
const (
CacheSyncPeriod = 60 * time.Second
PreSyncCacheWaitPeriod = 10 * time.Second
PostSyncCacheWaitPeriod = 30 * time.Second
ResizeSyncPeriod = 3 * time.Minute
PVDeleteWaitPeriod = 30 * time.Second
PodDeleteWaitPeriod = 60 * time.Second
ImportPVCacheWaitPeriod = 75 * time.Second
CacheBackoffInitialInterval = 1 * time.Second
CacheBackoffRandomizationFactor = 0.1
CacheBackoffMultiplier = 1.414
CacheBackoffMaxInterval = 5 * time.Second
// Kubernetes-defined storage class parameters
K8sFsType = "fsType"
// Kubernetes-defined annotations
// (Based on kubernetes/pkg/controller/volume/persistentvolume/controller.go)
AnnClass = "volume.beta.kubernetes.io/storage-class"
AnnDynamicallyProvisioned = "pv.kubernetes.io/provisioned-by"
AnnBindCompleted = "pv.kubernetes.io/bind-completed"
AnnStorageProvisioner = "volume.beta.kubernetes.io/storage-provisioner"
// Kubernetes-defined finalizers
FinalizerPVProtection = "kubernetes.io/pv-protection"
// Orchestrator-defined annotations
annPrefix = config.OrchestratorName + ".netapp.io"
AnnProtocol = annPrefix + "/protocol"
AnnSnapshotPolicy = annPrefix + "/snapshotPolicy"
AnnSnapshotReserve = annPrefix + "/snapshotReserve"
AnnSnapshotDir = annPrefix + "/snapshotDirectory"
AnnUnixPermissions = annPrefix + "/unixPermissions"
AnnExportPolicy = annPrefix + "/exportPolicy"
AnnBlockSize = annPrefix + "/blockSize"
AnnFileSystem = annPrefix + "/fileSystem"
AnnCloneFromPVC = annPrefix + "/cloneFromPVC"
AnnSplitOnClone = annPrefix + "/splitOnClone"
AnnNotManaged = annPrefix + "/notManaged"
AnnImportOriginalName = annPrefix + "/importOriginalName"
AnnImportBackendUUID = annPrefix + "/importBackendUUID"
)
var features = map[helpers.Feature]*utils.Version{
csiConfig.ExpandCSIVolumes: utils.MustParseSemantic("1.16.0"),
csiConfig.CSIBlockVolumes: utils.MustParseSemantic("1.14.0"),
}