-
Notifications
You must be signed in to change notification settings - Fork 164
/
Copy pathlocationconsts.go
163 lines (146 loc) · 7.92 KB
/
locationconsts.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// Copyright (c) 2019,2020 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
package types
import "strings"
const (
// TmpDirname - used for files fed into pubsub as global subscriptions
TmpDirname = "/run/global"
// PersistDir - Location to store persistent files.
PersistDir = "/persist"
// PersistConfigDir is where we used to keep some configuration across reboots. Remove once upgradeconverter code is removed.
PersistConfigDir = PersistDir + "/config"
// PersistStatusDir is where we keep some configuration across reboots
PersistStatusDir = PersistDir + "/status"
// CertificateDirname - Location of certificates
CertificateDirname = PersistDir + "/certs"
// SealedDirName - directory sealed under TPM PCRs
SealedDirName = PersistDir + "/vault"
// VolumeEncryptedDirName - sealed directory used to store volumes
VolumeEncryptedDirName = SealedDirName + "/volumes"
// ClearDirName - directory which is not encrypted
ClearDirName = PersistDir + "/clear"
// VolumeClearDirName - Not encrypted directory used to store volumes
VolumeClearDirName = ClearDirName + "/volumes"
// PersistDebugDir - Location for service specific debug/traces
PersistDebugDir = PersistDir + "/agentdebug"
// PersistInstallerDir - location for installer output
PersistInstallerDir = PersistDir + "/installer"
// IngestedDirname - location for shas of files we pulled from /config
IngestedDirname = PersistDir + "/ingested"
// SnapshotsDirname - location for snapshots
SnapshotsDirname = PersistDir + "/snapshots"
// SnapshotAppInstanceConfigFilename - file to store snapshot-related app instance config
SnapshotAppInstanceConfigFilename = "appInstanceConfig.json"
// SnapshotVolumesSnapshotStatusFilename - file to store volume snapshot status
SnapshotVolumesSnapshotStatusFilename = "volumesSnapshotStatus.json"
// SnapshotInstanceStatusFilename - file to store SnapshotInstanceStatus
SnapshotInstanceStatusFilename = "snapshotInstanceStatus.json"
// PersistCachePatchEnvelopes - folder to store inline patch envelopes
PersistCachePatchEnvelopes = PersistDir + "/patchEnvelopesCache"
// PersistCachePatchEnvelopesUsage - folder to store patch envelopes usage stat per app
PersistCachePatchEnvelopesUsage = PersistDir + "/patchEnvelopesUsageCache"
// IdentityDirname - Config dir
IdentityDirname = "/config"
// ServerFileName - server file
ServerFileName = IdentityDirname + "/server"
// DeviceCertName - device certificate
DeviceCertName = IdentityDirname + "/device.cert.pem"
// DeviceKeyName - device private key (if not in TPM)
DeviceKeyName = IdentityDirname + "/device.key.pem"
// OnboardCertName - Onboard certificate
OnboardCertName = IdentityDirname + "/onboard.cert.pem"
// OnboardKeyName - onboard key
OnboardKeyName = IdentityDirname + "/onboard.key.pem"
// RootCertFileName - what we trust for signatures and object encryption
RootCertFileName = IdentityDirname + "/root-certificate.pem"
// V2TLSCertShaFilename - find TLS root cert for API V2 based on this sha
V2TLSCertShaFilename = CertificateDirname + "/v2tlsbaseroot-certificates.sha256"
// V2TLSBaseFile is where the initial file
V2TLSBaseFile = IdentityDirname + "/v2tlsbaseroot-certificates.pem"
// APIV1FileName - user can statically allow for API v1
APIV1FileName = IdentityDirname + "/Force-API-V1"
// BootstrapConfFileName - file to store initial device configuration for bootstrapping
BootstrapConfFileName = IdentityDirname + "/bootstrap-config.pb"
// RemoteAccessFlagFileName -- file to check for remote access configuration
RemoteAccessFlagFileName = IdentityDirname + "/remote_access_disabled"
// BootstrapShaFileName - file to store SHA hash of an already ingested bootstrap config
BootstrapShaFileName = IngestedDirname + "/bootstrap-config.sha"
// ServerSigningCertFileName - filename for server signing leaf certificate
ServerSigningCertFileName = CertificateDirname + "/server-signing-cert.pem"
// ShareCertDirname - directory to place private proxy server certificates
ShareCertDirname = "/usr/local/share/ca-certificates"
// AppImgObj - name of app image type
AppImgObj = "appImg.obj"
// BaseOsObj - name of base image type
BaseOsObj = "baseOs.obj"
//ITokenFile contains the integrity token sent in attestation response
ITokenFile = "/run/eve.integrity_token"
//EveVersionFile contains the running version of EVE
EveVersionFile = "/run/eve-release"
//DefaultVaultName is the name of the default vault
DefaultVaultName = "Application Data Store"
// NewlogDir - newlog directories
NewlogDir = "/persist/newlog"
// NewlogCollectDir - newlog collect directory for temp log files
NewlogCollectDir = NewlogDir + "/collect"
// NewlogUploadDevDir - newlog device gzip file directory ready for upload
NewlogUploadDevDir = NewlogDir + "/devUpload"
// NewlogUploadAppDir - newlog app gzip file directory ready for upload
NewlogUploadAppDir = NewlogDir + "/appUpload"
// NewlogKeepSentQueueDir - a circular queue of gzip files already been sent
NewlogKeepSentQueueDir = NewlogDir + "/keepSentQueue"
// PillarHardMemoryLimitFile - hard memory reserved for pillar
PillarHardMemoryLimitFile = "/hostfs/sys/fs/cgroup/memory/eve/services/pillar/memory.limit_in_bytes"
// EveMemoryLimitFile - stores memory reserved for eve
EveMemoryLimitFile = "/hostfs/sys/fs/cgroup/memory/eve/memory.limit_in_bytes"
// EveMemoryUsageFile - current usage
EveMemoryUsageFile = "/hostfs/sys/fs/cgroup/memory/eve/memory.usage_in_bytes"
// EveKmemUsageFile - current kernel usage
EveKmemUsageFile = "/hostfs/sys/fs/cgroup/memory/eve/memory.kmem.usage_in_bytes"
// ZFSArcMaxSizeFile - file with zfs_arc_max size in bytes
ZFSArcMaxSizeFile = "/hostfs/sys/module/zfs/parameters/zfs_arc_max"
// DownloaderDir - storage for downloader
DownloaderDir = SealedDirName + "/downloader"
// VerifierDir - storage for verifier
VerifierDir = SealedDirName + "/verifier"
// ContainerdDir - path to user containerd storage
ContainerdDir = SealedDirName + "/containerd"
// ContainerdContentDir - path to containerd`s content store
ContainerdContentDir = ContainerdDir + "/io.containerd.content.v1.content"
// VtpmdCtrlSocket is UDS to ask vtpmd to launch SWTP instances for VMs
VtpmdCtrlSocket = "/run/swtpm/vtpmd.ctrl.sock"
// SwtpmCtrlSocketPath SWTPM per-vm socket path, the format string is filled with the App UUID
SwtpmCtrlSocketPath = "/run/swtpm/%s.ctrl.sock"
// SwtpmPidPath is SWTPM per-vm pid file path, the format string is filled with the App UUID
SwtpmPidPath = "/run/swtpm/%s.pid"
// MemoryMonitorDir - directory for memory monitor
MemoryMonitorDir = PersistDir + "/memory-monitor"
// MemoryMonitorOutputDir - directory for memory monitor output
MemoryMonitorOutputDir = MemoryMonitorDir + "/output"
// MemoryMonitorPSIStatsFile - file to store memory PSI (Pressure Stall Information) statistics
MemoryMonitorPSIStatsFile = MemoryMonitorOutputDir + "/psi.txt"
// OVMFSettingsDir - directory for OVMF settings, they are stored in per-domain files
OVMFSettingsDir = SealedDirName + "/ovmf"
// OVMFSettingsTemplate - template file for OVMF settings
OVMFSettingsTemplate = "/usr/lib/xen/boot/OVMF_VARS.fd"
// CustomOVMFSettingsDir - directory for custom OVMF settings (for different resolutions)
CustomOVMFSettingsDir = "/hostfs/etc/ovmf"
)
var (
// PersistDataset - parent dataset
PersistDataset = strings.TrimLeft(PersistDir, "/")
// PersistPool - parent pool
PersistPool = PersistDataset
// ClearDataset - dataset which is not encrypted
ClearDataset = strings.TrimLeft(ClearDirName, "/")
// SealedDataset - dataset sealed under TPM PCRs
SealedDataset = strings.TrimLeft(SealedDirName, "/")
// PersistReservedDataset - reserved dataset
PersistReservedDataset = PersistDataset + "/reserved"
//VolumeClearZFSDataset - dataset to create volumes without encryption
VolumeClearZFSDataset = ClearDataset + "/volumes"
//VolumeEncryptedZFSDataset - dataset to create volumes with encryption
VolumeEncryptedZFSDataset = SealedDataset + "/volumes"
// EtcdZvol - zvol encrypted for etcd storage
EtcdZvol = PersistDataset + "/etcd-storage"
)