acl: Add alloc-lifecycle namespace capability
This capability will gate access to features that allow interacting with a running allocation, for example, signalling, stopping, and rescheduling specific allocations.
This commit is contained in:
parent
24d3d723a8
commit
803e1a8b86
|
@ -28,6 +28,7 @@ const (
|
|||
NamespaceCapabilityDispatchJob = "dispatch-job"
|
||||
NamespaceCapabilityReadLogs = "read-logs"
|
||||
NamespaceCapabilityReadFS = "read-fs"
|
||||
NamespaceCapabilityAllocLifecycle = "alloc-lifecycle"
|
||||
NamespaceCapabilitySentinelOverride = "sentinel-override"
|
||||
)
|
||||
|
||||
|
@ -93,7 +94,7 @@ func isNamespaceCapabilityValid(cap string) bool {
|
|||
switch cap {
|
||||
case NamespaceCapabilityDeny, NamespaceCapabilityListJobs, NamespaceCapabilityReadJob,
|
||||
NamespaceCapabilitySubmitJob, NamespaceCapabilityDispatchJob, NamespaceCapabilityReadLogs,
|
||||
NamespaceCapabilityReadFS:
|
||||
NamespaceCapabilityReadFS, NamespaceCapabilityAllocLifecycle:
|
||||
return true
|
||||
// Separate the enterprise-only capabilities
|
||||
case NamespaceCapabilitySentinelOverride:
|
||||
|
@ -122,6 +123,7 @@ func expandNamespacePolicy(policy string) []string {
|
|||
NamespaceCapabilityDispatchJob,
|
||||
NamespaceCapabilityReadLogs,
|
||||
NamespaceCapabilityReadFS,
|
||||
NamespaceCapabilityAllocLifecycle,
|
||||
}
|
||||
default:
|
||||
return nil
|
||||
|
|
|
@ -80,6 +80,7 @@ func TestParse(t *testing.T) {
|
|||
NamespaceCapabilityDispatchJob,
|
||||
NamespaceCapabilityReadLogs,
|
||||
NamespaceCapabilityReadFS,
|
||||
NamespaceCapabilityAllocLifecycle,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue