Fake

We provide a fake implementation to help with testing. This provider returns static key/value pairs and nothing else. To use the fake provider simply create a SecretStore or ClusterSecretStore and configure it like in the following example:

Note

The provider returns static data configured in value or valueMap. You can define a version, too. If set the remoteRef from an ExternalSecret must match otherwise no value is returned.

apiVersion: external-secrets.io/v1alpha1
kind: ClusterSecretStore
metadata:
  name: fake
spec:
  provider:
    fake:
      data:
      - key: "/foo/bar"
        value: "HELLO1"
        version: "v1"
      - key: "/foo/bar"
        value: "HELLO2"
        version: "v2"
      - key: "/foo/baz"
        valueMap:
          foo: example
          other: thing

Please note that value is intended for exclusive use with data and valueMap for dataFrom. Here is an example ExternalSecret that displays this behavior:

Warning

This provider supports specifying different data[].version configurations. However, data[].property is ignored.

apiVersion: external-secrets.io/v1alpha1
kind: ExternalSecret
metadata:
  name: example
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: fake
    kind: ClusterSecretStore
  target:
    name: secret-to-be-created
  data:
  - secretKey: foo_bar
    remoteRef:
      key: /foo/bar
      version: v1
  dataFrom:
  - key: /foo/baz

This results in the following secret:

apiVersion: v1
kind: Secret
metadata:
  name: secret-to-be-created
  namespace: default
data:
  foo_bar: SEVMTE8x # HELLO1  (via data)
  foo: ZXhhbXBsZQ== # example (via dataFrom)
  other: dGhpbmc=   # thing   (via dataFrom)