Skip to content

Commit

Permalink
more rename
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly committed Sep 28, 2023
1 parent 8f985bf commit 6d1c20b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tf-kyverno
# json-kyverno

## create a terraform plan in json format

Expand All @@ -13,14 +13,14 @@ terraform plan -out=tf.plan
terraform show -json tf.plan > tf.plan.json
```

## build tf-kyverno
## build json-kyverno

```console
make build
```

## invoke tf-kyverno
## invoke json-kyverno

```console
./tf-kyverno --plan ./tf.plan.json --policy ./policy.yaml
./json-kyverno --plan ./tf.plan.json --policy ./policy.yaml
```
8 changes: 4 additions & 4 deletions pkg/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ func (c *command) Run(cmd *cobra.Command, _ []string) error {
func NewRootCommand() *cobra.Command {
var command command
cmd := &cobra.Command{
Use: "tf-kyverno",
Short: "tf-kyverno",
Long: "tf-kyverno is a CLI tool to apply policies to terraform plans",
Use: "json-kyverno",
Short: "json-kyverno",
Long: "json-kyverno is a CLI tool to apply policies to json resources",
Args: cobra.NoArgs,
RunE: command.Run,
SilenceUsage: true,
}
cmd.Flags().StringVar(&command.plan, "plan", "", "Path to terraform plan file (in json format)")
cmd.Flags().StringSliceVar(&command.policies, "policy", nil, "Path to tf-kyverno policies")
cmd.Flags().StringSliceVar(&command.policies, "policy", nil, "Path to json-kyverno policies")
return cmd
}

0 comments on commit 6d1c20b

Please sign in to comment.