@@ -10,6 +10,7 @@ import (
10
10
"github.com/alecthomas/units"
11
11
12
12
"github.com/cortexproject/cortex/pkg/storage/tsdb/backend/azure"
13
+ "github.com/cortexproject/cortex/pkg/storage/tsdb/backend/filesystem"
13
14
"github.com/cortexproject/cortex/pkg/storage/tsdb/backend/gcs"
14
15
"github.com/cortexproject/cortex/pkg/storage/tsdb/backend/s3"
15
16
)
@@ -24,6 +25,9 @@ const (
24
25
// BackendAzure is the value for the Azure storage backend
25
26
BackendAzure = "azure"
26
27
28
+ // BackendFilesystem is the value for the filesystem storge backend
29
+ BackendFilesystem = "filesystem"
30
+
27
31
// TenantIDExternalLabel is the external label set when shipping blocks to the storage
28
32
TenantIDExternalLabel = "__org_id__"
29
33
)
@@ -54,9 +58,10 @@ type Config struct {
54
58
MaxTSDBOpeningConcurrencyOnStartup int `yaml:"max_tsdb_opening_concurrency_on_startup"`
55
59
56
60
// Backends
57
- S3 s3.Config `yaml:"s3"`
58
- GCS gcs.Config `yaml:"gcs"`
59
- Azure azure.Config `yaml:"azure"`
61
+ S3 s3.Config `yaml:"s3"`
62
+ GCS gcs.Config `yaml:"gcs"`
63
+ Azure azure.Config `yaml:"azure"`
64
+ Filesystem filesystem.Config `yaml:"filesystem"`
60
65
}
61
66
62
67
// DurationList is the block ranges for a tsdb
@@ -102,6 +107,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
102
107
cfg .GCS .RegisterFlags (f )
103
108
cfg .Azure .RegisterFlags (f )
104
109
cfg .BucketStore .RegisterFlags (f )
110
+ cfg .Filesystem .RegisterFlags (f )
105
111
106
112
if len (cfg .BlockRanges ) == 0 {
107
113
cfg .BlockRanges = []time.Duration {2 * time .Hour } // Default 2h block
@@ -121,7 +127,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
121
127
122
128
// Validate the config
123
129
func (cfg * Config ) Validate () error {
124
- if cfg .Backend != BackendS3 && cfg .Backend != BackendGCS && cfg .Backend != BackendAzure {
130
+ if cfg .Backend != BackendS3 && cfg .Backend != BackendGCS && cfg .Backend != BackendAzure && cfg . Backend != BackendFilesystem {
125
131
return errUnsupportedBackend
126
132
}
127
133
0 commit comments