Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme #3

Merged
merged 1 commit into from
Jun 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,40 @@ A `kubectl` plugin for creating `SopsSecret` resources.

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`.

work in progress...
## Installation

Download a release for your platform and add it to the `PATH`.
A distribution via [Krew](https://krew.sigs.k8s.io/) is planned.

## Examples

### From literal values

```console
kubectl sops create secret generic test-secret --from-literal foo=foo_secret --from-literal bar=bar_secret
```

### From file

```console
kubectl sops create secret generic test-secret --from-file test.yaml
```

### 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 -- \
--kms arn:aws:kms:eu-central-1:123456789012:key/ffad06af-a6cc-43e5-ad61-51db75d17c77
```