-
Notifications
You must be signed in to change notification settings - Fork 2k
/
sentinel.go
52 lines (36 loc) · 1.31 KB
/
sentinel.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
package command
import (
"strings"
"github.com/mitchellh/cli"
)
type SentinelCommand struct {
Meta
}
func (f *SentinelCommand) Help() string {
helpText := `
Usage: nomad sentinel <subcommand> [options] [args]
This command groups subcommands for interacting with Sentinel policies.
Sentinel policies allow operators to express fine-grained policies as code and
have their policies automatically enforced. This allows operators to define a
"sandbox" and restrict actions to only those compliant with policy. The
Sentinel integration builds on the ACL System. Users can read existing
Sentinel policies, create new policies, delete and list existing policies, and
more. For a full guide on Sentinel policies see:
https://www.nomadproject.io/guides/sentinel-policy.html
Read an existing policy:
$ nomad sentinel read <name>
List existing policies:
$ nomad sentinel list
Create a new Sentinel policy:
$ nomad sentinel apply <name> <path>
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
}
func (f *SentinelCommand) Synopsis() string {
return "Interact with Sentinel policies"
}
func (f *SentinelCommand) Name() string { return "sentinel" }
func (f *SentinelCommand) Run(args []string) int {
return cli.RunResultHelp
}