1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

Added examples for all the Generators in the docs. Fixes #2260 (#2261)

Also, some generators's examples didn't have the `.metadata.name` property.

Signed-off-by: Sebastián Gómez <sebastiangomezcorrea@gmail.com>
This commit is contained in:
Sebastián Gómez 2023-04-26 16:00:14 -04:00 committed by GitHub
parent 59ca28db5f
commit fc7281a39b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 91 additions and 25 deletions

View file

@ -47,7 +47,7 @@ repository:my-repository:pull
{% include 'generator-acr.yaml' %}
```
Example ExternalSecret that references the ACR generator:
Example `ExternalSecret` that references the ACR generator:
```yaml
{% include 'generator-acr-example.yaml' %}
```

View file

@ -24,3 +24,8 @@ You can choose from three authentication mechanisms:
```yaml
{% include 'generator-ecr.yaml' %}
```
Example `ExternalSecret` that references the ECR generator:
```yaml
{% include 'generator-ecr-example.yaml' %}
```

View file

@ -5,4 +5,9 @@ The key/value pairs defined in `spec.data` is returned as-is.
```yaml
{% include 'generator-fake.yaml' %}
```
```
Example `ExternalSecret` that references the Fake generator:
```yaml
{% include 'generator-fake-example.yaml' %}
```

View file

@ -28,3 +28,8 @@ For details see [GCP Secret Manager](../../provider/google-secrets-manager.md#au
```yaml
{% include 'generator-gcr.yaml' %}
```
Example `ExternalSecret` that references the GCR generator:
```yaml
{% include 'generator-gcr-example.yaml' %}
```

View file

@ -28,13 +28,12 @@ You can influence the behavior of the generator by providing the following args
{% include 'generator-password.yaml' %}
```
The above `Password` can be used with this `ExternalSecret`
Example `ExternalSecret` that references the Password generator:
```yaml
{% include 'generator-password-external-secret.yaml' %}
{% include 'generator-password-example.yaml' %}
```
Which will generate a `Secret` with a password key that may look like:
Which will generate a `Kind=Secret` with a key called 'password' that may look like:
```
RMngCHKtZ@@h@3aja$WZDuDVhkCkN48JBa9OF8jH$R

View file

@ -17,3 +17,8 @@ are stored into the resulting Secret in JSON format.
```yaml
{% include 'generator-vault.yaml' %}
```
Example `ExternalSecret` that references the Vault generator:
```yaml
{% include 'generator-vault-example.yaml' %}
```

View file

@ -10,7 +10,7 @@ spec:
generatorRef:
apiVersion: generators.external-secrets.io/v1alpha1
kind: ACRAccessToken
name: myregistry.azurecr.io
name: my-azurecr
refreshInterval: 12h
target:
name: azurecr-credentials

View file

@ -1,5 +1,7 @@
apiVersion: generators.external-secrets.io/v1alpha1
kind: ACRAccessToken
metadata:
name: my-azurecr
spec:
tenantId: 11111111-2222-3333-4444-111111111111
registry: example.azurecr.io

View file

@ -0,0 +1,14 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "ecr-secret"
spec:
refreshInterval: "1h"
target:
name: ecr-secret
dataFrom:
- sourceRef:
generatorRef:
apiVersion: generators.external-secrets.io/v1alpha1
kind: ECRAuthorizationToken
name: "ecr-gen"

View file

@ -1,5 +1,7 @@
apiVersion: generators.external-secrets.io/v1alpha1
kind: ECRAuthorizationToken
metadata:
name: ecr-gen
spec:
# specify aws region (mandatory)

View file

@ -0,0 +1,14 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "fake"
spec:
refreshInterval: "30m"
target:
name: fake
dataFrom:
- sourceRef:
generatorRef:
apiVersion: generators.external-secrets.io/v1alpha1
kind: Fake
name: "fake-key"

View file

@ -1,6 +1,8 @@
apiVersion: generators.external-secrets.io/v1alpha1
kind: Fake
metadata:
name: fake-key
spec:
data:
foo: bar
baz: bang
baz: bang

View file

@ -0,0 +1,14 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "gcr-token"
spec:
refreshInterval: "30m"
target:
name: gcr-token
dataFrom:
- sourceRef:
generatorRef:
apiVersion: generators.external-secrets.io/v1alpha1
kind: GCRAccessToken
name: "gcr-gen"

View file

@ -1,5 +1,7 @@
apiVersion: generators.external-secrets.io/v1alpha1
kind: GCRAccessToken
metadata:
name: gcr-gen
spec:
# project where gcr lives in
projectID: ""

View file

@ -0,0 +1,14 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "pki-example-com"
spec:
refreshInterval: "768h"
target:
name: pki-example-com
dataFrom:
- sourceRef:
generatorRef:
apiVersion: generators.external-secrets.io/v1alpha1
kind: VaultDynamicSecret
name: "pki-example"

View file

@ -1,6 +1,5 @@
{% raw %}
---
apiVersion: generators.external-secrets.io/v1alpha1
kind: VaultDynamicSecret
metadata:
@ -19,20 +18,4 @@ spec:
role: "external-secrets-operator"
serviceAccountRef:
name: "default"
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "pki-example-com"
spec:
refreshInterval: "768h"
target:
name: pki-example-com
dataFrom:
- sourceRef:
generatorRef:
apiVersion: generators.external-secrets.io/v1alpha1
kind: VaultDynamicSecret
name: "pki-example"
{% endraw %}