|
|
@@ -5,8 +5,9 @@ The tool can be found under `cmd/esoctl`. The `template` command can be used to
|
|
|
To run render simply execute `make build` in the `cmd/esoctl` folder. This will result in a binary under `cmd/esoctl/bin`.
|
|
|
|
|
|
Once the build succeeds, the command can be used as such:
|
|
|
-```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
|
|
|
```
|
|
|
|
|
|
Where template-test looks like this:
|
|
|
@@ -22,7 +23,6 @@ template-test/
|
|
|
|
|
|
`PushSecret` is simply the following:
|
|
|
|
|
|
-
|
|
|
```yaml
|
|
|
{% include 'esoctl-tool-push-secret-snippet.yaml' %}
|
|
|
```
|
|
|
@@ -38,21 +38,21 @@ simply put it into a file along with the data it's using, and run this command.
|
|
|
|
|
|
The output will be something like this:
|
|
|
|
|
|
-```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:
|
|
|
token: VE9LRU4gd2FzIHRlbXBsYXRlZA==
|
|
|
metadata:
|
|
|
creationTimestamp: null
|
|
|
|
|
|
-➜ echo -n "VE9LRU4gd2FzIHRlbXBsYXRlZA==" | base64 -d
|
|
|
+echo -n "VE9LRU4gd2FzIHRlbXBsYXRlZA==" | base64 -d
|
|
|
TOKEN was templated⏎
|
|
|
```
|
|
|
|
|
|
Further options can be used to provide templates from a ConfigMap or a Secret:
|
|
|
```
|
|
|
-➜ ./bin/esoctl template --source-templated-object template-test/push-secret.yaml \
|
|
|
- --source-secret-data-file template-test/secret.yaml \
|
|
|
- --template-from-config-map template-test/template-config-map.yaml \
|
|
|
- --template-from-secret template-test/template-secret.yaml
|
|
|
+bin/esoctl template --source-templated-object template-test/push-secret.yaml \
|
|
|
+ --source-secret-data-file template-test/secret.yaml \
|
|
|
+ --template-from-config-map template-test/template-config-map.yaml \
|
|
|
+ --template-from-secret template-test/template-secret.yaml
|
|
|
```
|