Skip to content

Commit

Permalink
Update readme (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
unguiculus authored Jun 5, 2020
1 parent e3f2ab9 commit 9bbbf76
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ See https://github.com/craftypath/sops-operator.

The plugin automatically encrypts data using [Mozilla SOPS](https://github.com/mozilla/sops) and wraps them into a `SopsSecret`.
The interface is the same as that of `kubectl create secret`.
Additional args for SOPS must be passed after the `--` delimiter.

## Installation

Expand All @@ -19,27 +20,20 @@ A distribution via [Krew](https://krew.sigs.k8s.io/) is planned.
### From literal values

```console
kubectl sops create secret generic test-secret --from-literal foo=foo_secret --from-literal bar=bar_secret
kubectl sops create secret generic test-secret --from-literal foo=foo_secret --from-literal bar=bar_secret -- \
--kms arn:aws:kms:eu-central-1:123456789012:key/ffad06af-a6cc-43e5-ad61-51db75d17c77
```

### From file

```console
kubectl sops create secret generic test-secret --from-file test.yaml
kubectl sops create secret generic test-secret --from-file test.yaml -- \
--kms arn:aws:kms:eu-central-1:123456789012:key/ffad06af-a6cc-43e5-ad61-51db75d17c77
```

### From file printing resulting YAML without applying it

```console
kubectl sops create secret generic test-secret --from-literal foo.yaml="bar: barvalue" --dry-run -o yaml
```

### With additional parameters for SOPS

* Useful if no `.sops.yaml` is used
* Args after the `--` delimiter are passed to SOPS

```console
kubectl sops create secret generic test-secret --from-file test.yaml -- \
kubectl sops create secret generic test-secret --from-literal foo.yaml="bar: barvalue" --dry-run -o yaml -- \
--kms arn:aws:kms:eu-central-1:123456789012:key/ffad06af-a6cc-43e5-ad61-51db75d17c77
```

0 comments on commit 9bbbf76

Please sign in to comment.