Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
2f11a06f
Unverified
Commit
2f11a06f
authored
5 years ago
by
Lang Martin
Committed by
Danielle Lancashire
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
schema: csi_volumes schema
parent
56c5ac5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nomad/state/schema.go
+44
-0
nomad/state/schema.go
with
44 additions
and
0 deletions
+44
-0
nomad/state/schema.go
+
44
-
0
View file @
2f11a06f
...
...
@@ -47,6 +47,7 @@ func init() {
autopilotConfigTableSchema
,
schedulerConfigTableSchema
,
clusterMetaTableSchema
,
csiVolumeTableSchema
,
}
...
)
}
...
...
@@ -677,3 +678,46 @@ func clusterMetaTableSchema() *memdb.TableSchema {
},
}
}
func
csiVolumeTableSchema
()
*
memdb
.
TableSchema
{
return
&
memdb
.
TableSchema
{
Name
:
"csi_volumes"
,
Indexes
:
map
[
string
]
*
memdb
.
IndexSchema
{
// Primary index is used for volume upsert
// and simple direct lookup. ID is required to be
// unique.
"id"
:
{
Name
:
"id"
,
AllowMissing
:
false
,
Unique
:
true
,
// Use a compound so (Namespace, ID) is unique
Indexer
:
&
memdb
.
CompoundIndex
{
Indexes
:
[]
memdb
.
Indexer
{
&
memdb
.
StringFieldIndex
{
Field
:
"Namespace"
,
},
&
memdb
.
StringFieldIndex
{
Field
:
"ID"
,
},
},
},
},
"driver"
:
{
Name
:
"driver"
,
AllowMissing
:
false
,
Unique
:
false
,
Indexer
:
&
memdb
.
CompoundIndex
{
Indexes
:
[]
memdb
.
Indexer
{
&
memdb
.
StringFieldIndex
{
Field
:
"Namespace"
,
},
&
memdb
.
StringFieldIndex
{
Field
:
"Driver"
,
},
},
},
},
},
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment