Browse Source

Password yaml was missing the name (#2256)

I also thought it could be usefull to provide an External Secret that uses the Password from the example

Signed-off-by: Sebastián Gómez <sebastiangomezcorrea@gmail.com>
Sebastián Gómez 3 years ago
parent
commit
81b9546e0f

+ 7 - 1
docs/api/generator/password.md

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

+ 14 - 0
docs/snippets/generator-password-external-secret.yaml

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

+ 2 - 0
docs/snippets/generator-password.yaml

@@ -1,5 +1,7 @@
 apiVersion: generators.external-secrets.io/v1alpha1
 apiVersion: generators.external-secrets.io/v1alpha1
 kind: Password
 kind: Password
+metadata:
+  name: my-password
 spec:
 spec:
   length: 42
   length: 42
   digits: 5
   digits: 5