stuart-warren / random-secret-operator

Creates Secrets containing random data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random Secret Operator

The random secret operator creates Secrets containing random data.

This is useful for frameworks like Django, that need a SECRET_KEY to initialise cryptography, and needs to be the same across multiple instances.

Install metacontroller

Follow the upstream guide

Start the Operator

# Create the operator
$ kubectl apply -f deploy/operator.yaml
$ kubectl apply -f deploy/code.yaml

# Wait for the pod status to be Running
$ kubectl --namespace randomsecret get pod
NAME                                     READY     STATUS        RESTARTS   AGE
randomsecret-operator-6db7d8c7cf-l8vr4   1/1       Running       0          3s


# View the random secret CRD
$ kubectl get crd randomsecrets.randomsecrets.mikebryant.me.uk
NAME                                           AGE
randomsecrets.randomsecrets.mikebryant.me.uk   32s

Create the example RandomSecret Resource

# Create the example
$ kubectl apply -f examples/resource.yaml

# See the example resource
$ kubectl -n default get randomsecrets
NAME      AGE
minimal   12s

Cleanup

$ kubectl delete -f examples
$ kubectl delete -f deploy

About

Creates Secrets containing random data.

License:Apache License 2.0


Languages

Language:Python 79.2%Language:Shell 20.8%