A Kubernetes operator to sync and decrypt secrets from a password store Git repository
766
pass secrets operatorA Kubernetes operator to sync and decrypt secrets from a password store (pass) Git repository. This operator is proposed as a proof-of-concept and shouldn't be used in any production capacity.
While this approach to secrets management on Kubernetes is more technically challenging, the advantage is that we don't have to rely on a 3rd party SaaS platform, such as Vault or Doppler, to hold our secrets (the obvious benefits these platforms do provide, however, are better user and access management). We may also use this operator in an airgapped environment with a self-hosted git repository.
The following flowchart outlines how this operator reacts to PassSecret-related events and pass store updates.
From a high level, this operator runs git pull on an interval to grab updates from a git repository populated with encrypted
secrets by pass. It maps secrets' paths to data values through the application of a PassSecret, a custom resource, such as the following.
apiVersion: secrets.premiscale.com/v1alpha1
kind: PassSecret
metadata:
name: mysecret
namespace: pass-operator-test
spec:
encryptedData:
mykey: premiscale/mydata
managedSecret:
metadata:
name: mysecret
namespace: pass-operator-test
type: Opaque
immutable: false
The above PassSecret manifest translates to the following Secret.
apiVersion: v1
kind: Secret
metadata:
name: mysecret
namespace: pass-operator-test
stringData:
mykey: <decrypted contents of premiscale/mydata>
immutable: false
type: Opaque
See the chart README for an overview of operator installation and configuration options.
Run unit tests with
yarn test:unit
Run e2e tests against a live (local) environment with
yarn test:e2e
This command will
localhost docker registry redirect container.Test coverage against the codebase with
poetry run coverage run -m pytest
poetry run coverage report -m pytest
Content type
Image
Digest
sha256:6c7bec86e…
Size
447.4 MB
Last updated
about 2 years ago
docker pull premiscale/pass-operator:0.4.8