nomad: adding policy table to state store
This commit is contained in:
parent
a0c3787a9e
commit
85cad11885
|
@ -26,6 +26,7 @@ func stateStoreSchema() *memdb.DBSchema {
|
|||
evalTableSchema,
|
||||
allocTableSchema,
|
||||
vaultAccessorTableSchema,
|
||||
aclPolicyTableSchema,
|
||||
}
|
||||
|
||||
// Add each of the tables
|
||||
|
@ -430,3 +431,21 @@ func vaultAccessorTableSchema() *memdb.TableSchema {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
// aclPolicyTableSchema returns the MemDB schema for the policy table.
|
||||
// This table is used to store the policies which are refrenced by tokens
|
||||
func aclPolicyTableSchema() *memdb.TableSchema {
|
||||
return &memdb.TableSchema{
|
||||
Name: "acl_policy",
|
||||
Indexes: map[string]*memdb.IndexSchema{
|
||||
"id": &memdb.IndexSchema{
|
||||
Name: "id",
|
||||
AllowMissing: false,
|
||||
Unique: true,
|
||||
Indexer: &memdb.StringFieldIndex{
|
||||
Field: "Name",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue