Skip to content

Commit

Permalink
cli: add command descriptions
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jan 15, 2024
1 parent 513c5cb commit e7f6d56
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
14 changes: 12 additions & 2 deletions cli/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,18 @@ const kataPolicyAnnotationKey = "io.katacontainers.config.agent.policy"
func newGenerateCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "generate [flags] paths...",
Short: "generate",
RunE: runGenerate,
Short: "generate policies and inject into Kubernetes resources",
Long: `
Generate policies and inject into the given Kubernetes resources.
This will download the referenced container images to calculate the dm-verity
hashes of the image layers. In addition, the Rego policy will be used as base
and updated with the given settings file. For each container workload, the policy
is added as annotaiton in the Kubernetes YAML.
The hashes of the policies are added to the manifest.
`,
RunE: runGenerate,
}

cmd.Flags().StringP("policy", "p", policyDir, "path to policy (.rego) file")
Expand Down
17 changes: 14 additions & 3 deletions cli/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,20 @@ import (
func newSetCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "set [flags] paths...",
Short: "Set a manifest",
Long: `Set a manifest.`,
RunE: runSet,
Short: "Set the given manifest at the coordinator",
Long: `
Set the given manifest at the coordinator.
This will connect to the given Coordinator using aTLS. During the connection
initialization, the remote attestation of the Coordinator CVM happens and
the connection will only be successful if the Coordinator conforms with the
reference values embedded into the CLI.
After the connection is established, the manifest is set. The Coordinator
will re-generate the mesh root certificate and accept new workloads to
issuer certificates.
`,
RunE: runSet,
}

cmd.Flags().StringP("manifest", "m", manifestFilename, "path to manifest (.json) file")
Expand Down
14 changes: 12 additions & 2 deletions cli/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,18 @@ func newVerifyCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "verify",
Short: "Verify a nunki deployment",
Long: `Verify a manifest.`,
RunE: runVerify,
Long: `
Verify a nunki deployment.
This will connect to the given Coordinator using aTLS. During the connection
initialization, the remote attestation of the Coordinator CVM happens and
the connection will only be successful if the Coordinator conforms with the
reference values embedded into the CLI.
After the connection is established, the CLI will request the manifest histroy,
all policies, and the certificates of the Coordinator certifcate authority.
`,
RunE: runVerify,
}

cmd.Flags().StringP("output", "o", verifyDir, "directory to write files to")
Expand Down

0 comments on commit e7f6d56

Please sign in to comment.