Browse Source

fix: documentation and naming for render tool (#4324)

Gergely Brautigam 1 year ago
parent
commit
4abf9c6d0a

+ 2 - 2
.gitignore

@@ -2,8 +2,8 @@
 /webhook/bin
 /webhook/bin
 /webhook/certcontroller/bin
 /webhook/certcontroller/bin
 /bin
 /bin
-/cmd/render/bin
-/cmd/render/dist
+/cmd/esoctl/bin
+/cmd/esoctl/dist
 /vendor
 /vendor
 cover.out
 cover.out
 
 

+ 2 - 2
cmd/esoctl/README.md

@@ -4,11 +4,11 @@ This tool contains external-secrets-operator related activities and helpers.
 
 
 ## Templates
 ## Templates
 
 
-`cmd/render` -> `esoctl template`
+`cmd/esoctl` -> `esoctl template`
 
 
 The purpose is to give users the ability to rapidly test and iterate on templates in a PushSecret/ExternalSecret.
 The purpose is to give users the ability to rapidly test and iterate on templates in a PushSecret/ExternalSecret.
 
 
-For a more in-dept description read [Using Render Tool](../../docs/guides/using-render-tool.md).
+For a more in-dept description read [Using esoctl Tool](../../docs/guides/using-esoctl-tool.md).
 
 
 This project doesn't have its own go mod files to allow it to grow together with ESO instead of waiting for new ESO
 This project doesn't have its own go mod files to allow it to grow together with ESO instead of waiting for new ESO
 releases to import it.
 releases to import it.

+ 5 - 25
docs/guides/using-render-tool.md

@@ -1,4 +1,4 @@
-# Using the Render tool
+# Using the esoctl tool
 
 
 The tool can be found under `cmd/esoctl`. The `template` command can be used to test templates for `PushSecret` and `ExternalSecret`.
 The tool can be found under `cmd/esoctl`. The `template` command can be used to test templates for `PushSecret` and `ExternalSecret`.
 
 
@@ -22,29 +22,9 @@ template-test/
 
 
 `PushSecret` is simply the following:
 `PushSecret` is simply the following:
 
 
+
 ```yaml
 ```yaml
-apiVersion: external-secrets.io/v1alpha1
-kind: PushSecret
-metadata:
-  name: example-push-secret-with-template
-spec:
-  refreshInterval: 10s
-  secretStoreRefs:
-    - name: secret-store-name
-      kind: SecretStore
-  selector:
-    secret:
-      name: git-sync-secret
-  template:
-    engineVersion: v2
-    data:
-      token: "{{ .token | toString | upper }} was templated"
-  data:
-    - match:
-        secretKey: token
-        remoteRef:
-          remoteKey: git-sync-secret-copy-templated
-          property: token
+{% include 'esoctl-tool-push-secret-snippet.yaml' %}
 ```
 ```
 
 
 And secret data is:
 And secret data is:
@@ -59,13 +39,13 @@ simply put it into a file along with the data it's using, and run this command.
 The output will be something like this:
 The output will be something like this:
 
 
 ```console
 ```console
-➜ ./bin/esoctl template --source-templated-object template-test/push-secret.yaml --source-secret-data-file template-test/secret.yaml                                                                                                          
+➜ ./bin/esoctl template --source-templated-object template-test/push-secret.yaml --source-secret-data-file template-test/secret.yaml
 data:
 data:
   token: VE9LRU4gd2FzIHRlbXBsYXRlZA==
   token: VE9LRU4gd2FzIHRlbXBsYXRlZA==
 metadata:
 metadata:
   creationTimestamp: null
   creationTimestamp: null
 
 
-➜ echo -n "VE9LRU4gd2FzIHRlbXBsYXRlZA==" | base64 -d                                                                                                                                                                                    
+➜ echo -n "VE9LRU4gd2FzIHRlbXBsYXRlZA==" | base64 -d
 TOKEN was templated⏎
 TOKEN was templated⏎
 ```
 ```
 
 

+ 22 - 0
docs/snippets/esoctl-tool-push-secret-snippet.yaml

@@ -0,0 +1,22 @@
+apiVersion: external-secrets.io/v1alpha1
+kind: PushSecret
+metadata:
+  name: example-push-secret-with-template
+spec:
+  refreshInterval: 10s
+  secretStoreRefs:
+    - name: secret-store-name
+      kind: SecretStore
+  selector:
+    secret:
+      name: git-sync-secret
+  template:
+    engineVersion: v2
+    data:
+      token: "{{ .token | toString | upper }} was templated"
+  data:
+    - match:
+        secretKey: token
+        remoteRef:
+          remoteKey: git-sync-secret-copy-templated
+          property: token

+ 1 - 1
hack/api-docs/mkdocs.yml

@@ -105,7 +105,7 @@ nav:
           - Using Latest Image: guides/using-latest-image.md
           - Using Latest Image: guides/using-latest-image.md
           - Disable Cluster Features: guides/disable-cluster-features.md
           - Disable Cluster Features: guides/disable-cluster-features.md
       - Tooling:
       - Tooling:
-          - Using the Render tool: guides/using-render-tool.md
+          - Using the esoctl tool: guides/using-esoctl-tool.md
   - Provider:
   - Provider:
       - AWS Secrets Manager: provider/aws-secrets-manager.md
       - AWS Secrets Manager: provider/aws-secrets-manager.md
       - AWS Parameter Store: provider/aws-parameter-store.md
       - AWS Parameter Store: provider/aws-parameter-store.md