Browse Source

Updating docs (#2122)

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

+ 12 - 0
docs/provider/aws-parameter-store.md

@@ -73,6 +73,18 @@ spec:
       key: friendslist
       key: friendslist
       property: friends.1.first # Roger
       property: friends.1.first # Roger
 
 
+  # metadataPolicy to fetch all the tags in JSON format
+  - secretKey: tags
+    remoteRef:
+      metadataPolicy: Fetch 
+      key: database-credentials
+
+  # metadataPolicy to fetch a specific tag (dev) from the source secret
+  - secretKey: developer
+    remoteRef:
+      metadataPolicy: Fetch 
+      key: database-credentials
+      property: dev
 ```
 ```
 ### Parameter Versions
 ### Parameter Versions
 
 

+ 16 - 0
docs/provider/hashicorp-vault.md

@@ -72,6 +72,20 @@ spec:
     remoteRef:
     remoteRef:
       key: foo
       key: foo
       property: my-value
       property: my-value
+
+  # metadataPolicy to fetch all the labels in JSON format
+  - secretKey: tags
+    remoteRef:
+      metadataPolicy: Fetch 
+      key: foo
+
+  # metadataPolicy to fetch a specific label (dev) from the source secret
+  - secretKey: developer
+    remoteRef:
+      metadataPolicy: Fetch 
+      key: foo
+      property: dev
+
 ---
 ---
 # will create a secret with:
 # will create a secret with:
 kind: Secret
 kind: Secret
@@ -81,6 +95,8 @@ data:
   foobar: czNjcjN0
   foobar: czNjcjN0
 ```
 ```
 
 
+Keep in mind that fetching the labels with `metadataPolicy: Fetch` only works with KV sercrets engine version v2.
+
 #### Fetching Raw Values
 #### Fetching Raw Values
 
 
 You can fetch all key/value pairs for a given path If you leave the `remoteRef.property` empty. This returns the json-encoded secret value for that path.
 You can fetch all key/value pairs for a given path If you leave the `remoteRef.property` empty. This returns the json-encoded secret value for that path.

+ 13 - 0
docs/snippets/aws-sm-external-secret.yaml

@@ -19,3 +19,16 @@ spec:
     remoteRef:
     remoteRef:
       key: friendslist
       key: friendslist
       property: friends.1.first # Roger
       property: friends.1.first # Roger
+
+  # metadataPolicy to fetch all the labels in JSON format
+  - secretKey: tags
+    remoteRef:
+      metadataPolicy: Fetch 
+      key: database-credentials
+
+  # metadataPolicy to fetch a specific label (dev) from the source secret
+  - secretKey: developer
+    remoteRef:
+      metadataPolicy: Fetch 
+      key: database-credentials
+      property: dev