From cb9a907bbccd7409a3d200707d8c4dba02050cb1 Mon Sep 17 00:00:00 2001 From: Tom Morelly Date: Sun, 7 Apr 2024 08:49:55 +0700 Subject: [PATCH] feat(docs): add GA4 and restructure docs --- README.md | 12 ++-- .../index.md => authentication.md} | 6 +- docs/{cicd/azure.md => cicd_azure.md} | 0 docs/{cicd/github.md => cicd_github.md} | 0 docs/{cicd/gitlab.md => cicd_gitlab.md} | 0 .../index.md => configuration.md} | 3 +- docs/{development/index.md => development.md} | 1 + .../diff.md => example_diff.md} | 4 +- .../direnv.md => example_direnv.md} | 5 +- .../fzf.md => example_fzf.md} | 4 +- .../kubernetes.md => example_kubernetes.md} | 15 +++-- .../sops.md => example_sops.md} | 6 +- docs/{export/index.md => export.md} | 7 +- docs/{export/formats.md => export_formats.md} | 0 docs/{import/index.md => import.md} | 9 +-- docs/index.md | 12 ++-- .../index.md => installation.md} | 12 ++-- docs/{engines/index.md => list_engines.md} | 9 +-- .../index.md => list_namespaces.md} | 10 +-- docs/{quickstart/index.md => quickstart.md} | 30 ++++----- docs/{server/index.md => server.md} | 6 +- .../restore.md => snapshot_restore.md} | 7 +- docs/{snapshot/save.md => snapshot_save.md} | 9 +-- mkdocs.yml | 64 ++++++++++--------- 24 files changed, 109 insertions(+), 122 deletions(-) rename docs/{authentication/index.md => authentication.md} (95%) rename docs/{cicd/azure.md => cicd_azure.md} (100%) rename docs/{cicd/github.md => cicd_github.md} (100%) rename docs/{cicd/gitlab.md => cicd_gitlab.md} (100%) rename docs/{configuration/index.md => configuration.md} (89%) rename docs/{development/index.md => development.md} (98%) rename docs/{advanced_examples/diff.md => example_diff.md} (89%) rename docs/{advanced_examples/direnv.md => example_direnv.md} (94%) rename docs/{advanced_examples/fzf.md => example_fzf.md} (90%) rename docs/{advanced_examples/kubernetes.md => example_kubernetes.md} (95%) rename docs/{advanced_examples/sops.md => example_sops.md} (98%) rename docs/{export/index.md => export.md} (91%) rename docs/{export/formats.md => export_formats.md} (100%) rename docs/{import/index.md => import.md} (89%) rename docs/{installation/index.md => installation.md} (92%) rename docs/{engines/index.md => list_engines.md} (83%) rename docs/{namespaces/index.md => list_namespaces.md} (81%) rename docs/{quickstart/index.md => quickstart.md} (94%) rename docs/{server/index.md => server.md} (94%) rename docs/{snapshot/restore.md => snapshot_restore.md} (66%) rename docs/{snapshot/save.md => snapshot_save.md} (78%) diff --git a/README.md b/README.md index 1db12172..df0cd666 100644 --- a/README.md +++ b/README.md @@ -15,17 +15,17 @@ ## Features * Support KV version 1 & version 2 (no need to specify the version `vkv` will automatically detect the engines version) -* **CI/CD Integrations for [Gitlab, GitHub, Azure Devops](https://falcosuessgott.github.io/vkv/cicd/gitlab/)** +* **CI/CD Integrations for [Gitlab, GitHub, Azure Devops](https://falcosuessgott.github.io/vkv/cicd_gitlab)** * support all Vault Auth Env Vars and `VKV_LOGIN_COMMAND` for avoiding having to hardcode the `VAULT_TOKEN` ([example](https://falcosuessgott.github.io/vkv/authentication/)) -* recursively print secrets of any KV Engine in `json`, `yaml`, `markdown` and [other formats](https://falcosuessgott.github.io/vkv/export/formats/) +* recursively print secrets of any KV Engine in `json`, `yaml`, `markdown` and [other formats](https://falcosuessgott.github.io/vkv/export_formats/) * engine export shows the secret version as well as its [custom metadata](https://developer.hashicorp.com/vault/docs/commands/kv/metadata) * customize the output (show only-keys, only-paths, mask/unmask secrets) via [flags or environment](https://falcosuessgott.github.io/vkv/export/) * print the CRUD-capabilities of the authenticated token for each KV-path (format: `policy`) * print secrets in `export =` format for env var exporting (format: `export`) -* [import](https://falcosuessgott.github.io/vkv/06_import/) secrets back to Vault from `vkv`'s `json` or `yaml` format output -* save and restore KVv2 snapshots (including namespaces) ([kubernetes](https://falcosuessgott.github.io/vkv/advanced_examples/kubernetes/) example) -* list all KVv2-engines or namespaces for scripting purposes ([fzf](https://falcosuessgott.github.io/vkv/advanced_examples/fzf/) example) -* more handy [snippets](https://falcosuessgott.github.io/vkv/advanced_examples/diff/) using `fzf`, `sops` & `diff`, +* [import](https://falcosuessgott.github.io/vkv/import/) secrets back to Vault from `vkv`'s `json` or `yaml` format output +* save and restore KVv2 snapshots (including namespaces) ([kubernetes](https://falcosuessgott.github.io/vkv/example_kubernetes/) example) +* list all KVv2-engines or namespaces for scripting purposes ([fzf](https://falcosuessgott.github.io/vkv/example_fzf/) example) +* more handy [snippets](https://falcosuessgott.github.io/vkv/example_diff/) using `fzf`, `sops` & `diff`, Checkout the [Quickstart](https://falcosuessgott.github.io/vkv/quickstart/) Guide to learn more about `vkv` diff --git a/docs/authentication/index.md b/docs/authentication.md similarity index 95% rename from docs/authentication/index.md rename to docs/authentication.md index 5b92e6aa..dde64a0a 100644 --- a/docs/authentication/index.md +++ b/docs/authentication.md @@ -1,13 +1,15 @@ +# Authentication + `vkv` supports all of Vaults [environment variables](https://www.vaultproject.io/docs/commands#environment-variables). In order to authenticate you will have to set at least `VAULT_ADDR` and `VAULT_TOKEN`. -### MacOS/Linux +## MacOS/Linux ``` export VAULT_ADDR="http://127.0.0.1:8200" export VAULT_TOKEN="hvs.XXX" vkv export --path ``` -### Windows +## Windows ``` SET VAULT_ADDR=http://127.0.0.1:8200 SET VAULT_TOKEN=s.XXX diff --git a/docs/cicd/azure.md b/docs/cicd_azure.md similarity index 100% rename from docs/cicd/azure.md rename to docs/cicd_azure.md diff --git a/docs/cicd/github.md b/docs/cicd_github.md similarity index 100% rename from docs/cicd/github.md rename to docs/cicd_github.md diff --git a/docs/cicd/gitlab.md b/docs/cicd_gitlab.md similarity index 100% rename from docs/cicd/gitlab.md rename to docs/cicd_gitlab.md diff --git a/docs/configuration/index.md b/docs/configuration.md similarity index 89% rename from docs/configuration/index.md rename to docs/configuration.md index db21c1fb..f9edeaf5 100644 --- a/docs/configuration/index.md +++ b/docs/configuration.md @@ -1,6 +1,7 @@ +# Configuration `vkv` and all its subcommands are highly configurable using environment variables. -Checkout the subcommands documentation aswell as the help messages (`vkv --help`) to see the available environment variables. +Checkout the subcommands documentation as well as the help messages (`vkv --help`) to see the available environment variables. ## Mode You can control the executed subcommand of `vkv` by setting `VKV_MODE` to either on of: diff --git a/docs/development/index.md b/docs/development.md similarity index 98% rename from docs/development/index.md rename to docs/development.md index 668fd1c8..cace55fe 100644 --- a/docs/development/index.md +++ b/docs/development.md @@ -1,3 +1,4 @@ +# Development Clone this repository and run: ```sh diff --git a/docs/advanced_examples/diff.md b/docs/example_diff.md similarity index 89% rename from docs/advanced_examples/diff.md rename to docs/example_diff.md index cf5ec2dc..da027eca 100644 --- a/docs/advanced_examples/diff.md +++ b/docs/example_diff.md @@ -1,4 +1,4 @@ - +# diff `vkv` can be used to compare secrets across Vault servers or KV engines. ```bash @@ -8,4 +8,4 @@ Here is an example using `diff`, the `|` indicates the changed entry per line: ## Demo -![gif](../assets/diff.gif) +![gif](assets/diff.gif) diff --git a/docs/advanced_examples/direnv.md b/docs/example_direnv.md similarity index 94% rename from docs/advanced_examples/direnv.md rename to docs/example_direnv.md index 3925c6c5..fa40da09 100644 --- a/docs/advanced_examples/direnv.md +++ b/docs/example_direnv.md @@ -1,9 +1,10 @@ +# direnv You can use `vkv` and [`direnv`](https://direnv.net/) to autimatically source KV secrets in your shell. -### Prerequisites +## Prerequisites * Install [direnv](https://direnv.net/) and hook into your shell -### Demo +## Demo Create in a project a `.envrc` file: ```bash diff --git a/docs/advanced_examples/fzf.md b/docs/example_fzf.md similarity index 90% rename from docs/advanced_examples/fzf.md rename to docs/example_fzf.md index 5ae2941d..8f6c9181 100644 --- a/docs/advanced_examples/fzf.md +++ b/docs/example_fzf.md @@ -1,3 +1,5 @@ +# fzf + using `vault secrets list` and a little bit of `jq`-logic, we can get a list of all KV-engines visible for the token. If we pipe this into `fzf` we can get a handy little preview-app: @@ -7,4 +9,4 @@ vkv list engines --all --include-ns-prefix | fzf --preview 'vkv export -e ${}' ``` ## Demo -![gif](../assets/fzf.gif) +![gif](assets/fzf.gif) diff --git a/docs/advanced_examples/kubernetes.md b/docs/example_kubernetes.md similarity index 95% rename from docs/advanced_examples/kubernetes.md rename to docs/example_kubernetes.md index 80abefba..c8fc71c3 100644 --- a/docs/advanced_examples/kubernetes.md +++ b/docs/example_kubernetes.md @@ -1,11 +1,12 @@ +# Kubernetes + `vkv` comes in container images, which enable you to run scheduled snapshots in a kubernetes cluster. The idea is to schedule a cronjob which snapshots a vault server and writes the snapshot files to a persistent volume. Here is a minimum working `k3s` using `local-storage` example: - -### create the volume directories +## create the volume directories ```bash # on a k3s node @@ -13,7 +14,7 @@ mkdir -p /data/volume/pv1 chmod 777 /data/volume/pv1 # for testing ``` -### create a pv +## create a pv ```yaml apiVersion: v1 @@ -39,7 +40,7 @@ spec: - worker-node # change ``` -### create a pvc +## create a pvc ```yaml kind: PersistentVolumeClaim apiVersion: v1 @@ -54,7 +55,7 @@ spec: storage: 5Gi ``` -### create a cronjob +## create a cronjob ```yaml apiVersion: batch/v1 kind: CronJob @@ -90,7 +91,7 @@ spec: claimName: pvc ``` -### verify snapshots +## verify snapshots if everything went correct, you should see the following: ```bash @@ -100,7 +101,7 @@ drwxr-xr-x. 2 root root 108 5. Jan 09:50 vkv-export-20230105095000 drwxr-xr-x. 2 root root 108 5. Jan 09:51 vkv-export-20230105095100 ``` -### some last thoughts +## some last thoughts Obviously this approach is just for development purposes. In order to make it production ready, you should consider changing some things, such as: * inject the environments from a ConfigMap diff --git a/docs/advanced_examples/sops.md b/docs/example_sops.md similarity index 98% rename from docs/advanced_examples/sops.md rename to docs/example_sops.md index f3f484b7..e016bc15 100644 --- a/docs/advanced_examples/sops.md +++ b/docs/example_sops.md @@ -1,10 +1,12 @@ +# sops + In order to store the secret export created by `vkv` [sops](https://github.com/mozilla/sops#encrypting-using-hashicorp-vault) can be used. This example shows how to encrypt & decrypt `vkv` exported secrets using `sops` and Vaults transit engine: -### Prerequisites +## Prerequisites * Install [sops](https://github.com/mozilla/sops/releases) -### Demo +## Demo ```bash export VAULT_ADDR="https://vault.server" export VAULT_TOKEN="hvs.XXXX" diff --git a/docs/export/index.md b/docs/export.md similarity index 91% rename from docs/export/index.md rename to docs/export.md index b5ec1742..acdea417 100644 --- a/docs/export/index.md +++ b/docs/export.md @@ -1,3 +1,4 @@ +# Export ## vkv export recursively list secrets from Vaults KV2 engine in various formats @@ -23,9 +24,3 @@ vkv export [flags] -f, --format string available output formats: "base", "json", "yaml", "export", "policy", "markdown", "template" (env: VKV_EXPORT_FORMAT) (default "base") -h, --help help for export ``` - -### SEE ALSO - -* [vkv](vkv.md) - the swiss army knife when working with Vault KVv2 engines - -###### Auto generated by spf13/cobra on 19-Nov-2023 diff --git a/docs/export/formats.md b/docs/export_formats.md similarity index 100% rename from docs/export/formats.md rename to docs/export_formats.md diff --git a/docs/import/index.md b/docs/import.md similarity index 89% rename from docs/import/index.md rename to docs/import.md index 70af9859..25916e94 100644 --- a/docs/import/index.md +++ b/docs/import.md @@ -1,3 +1,4 @@ +# Import # vkv import import secrets from vkv's json or yaml output @@ -19,15 +20,9 @@ vkv import [flags] -s, --silent do not output secrets (env: VKV_IMPORT_SILENT) ``` -### SEE ALSO - -* [vkv](vkv.md) - the swiss army knife when working with Vault KVv2 engines - -###### Auto generated by spf13/cobra on 19-Nov-2023 - ## read secrets from STDIN -The `-` in `vkv import -`, tells `vkv` do read data via STDIN. The idea of `vkv import -` is, in order to copy/mirror KV-v2 secrets or complete engines across diferrent Vault Servers or Namespaces, you can simply pipe +The `-` in `vkv import -`, tells `vkv` do read data via STDIN. The idea of `vkv import -` is, in order to copy/mirror KV-v2 secrets or complete engines across different Vault Servers or Namespaces, you can simply pipe `vkv`s output into the `vkv import` command: ```bash diff --git a/docs/index.md b/docs/index.md index e44e1313..ac731b54 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,16 +15,16 @@ ## Features * Support KV version 1 & version 2 (no need to specify the version `vkv` will automatically detect the engines version) -* **CI/CD Integrations for [Gitlab, GitHub, Azure Devops](https://falcosuessgott.github.io/vkv/cicd/gitlab/)** +* **CI/CD Integrations for [Gitlab, GitHub, Azure Devops](https://falcosuessgott.github.io/vkv/cicd_gitlab)** * support all Vault Auth Env Vars and `VKV_LOGIN_COMMAND` for avoiding having to hardcode the `VAULT_TOKEN` ([example](https://falcosuessgott.github.io/vkv/authentication/)) -* recursively print secrets of any KV Engine in `json`, `yaml`, `markdown` and [other formats](https://falcosuessgott.github.io/vkv/export/formats/) +* recursively print secrets of any KV Engine in `json`, `yaml`, `markdown` and [other formats](https://falcosuessgott.github.io/vkv/export_formats/) * engine export shows the secret version as well as its [custom metadata](https://developer.hashicorp.com/vault/docs/commands/kv/metadata) * customize the output (show only-keys, only-paths, mask/unmask secrets) via [flags or environment](https://falcosuessgott.github.io/vkv/export/) * print the CRUD-capabilities of the authenticated token for each KV-path (format: `policy`) * print secrets in `export =` format for env var exporting (format: `export`) -* [import](https://falcosuessgott.github.io/vkv/06_import/) secrets back to Vault from `vkv`'s `json` or `yaml` format output -* save and restore KVv2 snapshots (including namespaces) ([kubernetes](https://falcosuessgott.github.io/vkv/advanced_examples/kubernetes/) example) -* list all KVv2-engines or namespaces for scripting purposes ([fzf](https://falcosuessgott.github.io/vkv/advanced_examples/fzf/) example) -* more handy [snippets](https://falcosuessgott.github.io/vkv/advanced_examples/diff/) using `fzf`, `sops` & `diff`, +* [import](https://falcosuessgott.github.io/vkv/import/) secrets back to Vault from `vkv`'s `json` or `yaml` format output +* save and restore KVv2 snapshots (including namespaces) ([kubernetes](https://falcosuessgott.github.io/vkv/example_kubernetes/) example) +* list all KVv2-engines or namespaces for scripting purposes ([fzf](https://falcosuessgott.github.io/vkv/example_fzf/) example) +* more handy [snippets](https://falcosuessgott.github.io/vkv/example_diff/) using `fzf`, `sops` & `diff`, Checkout the [Quickstart](https://falcosuessgott.github.io/vkv/quickstart/) Guide to learn more about `vkv` diff --git a/docs/installation/index.md b/docs/installation.md similarity index 92% rename from docs/installation/index.md rename to docs/installation.md index 8ecab695..c519e2b1 100644 --- a/docs/installation/index.md +++ b/docs/installation.md @@ -1,4 +1,6 @@ -### cURL +# Installation + +## cURL ```bash version=$(curl https://api.github.com/repos/falcosuessgott/vkv/releases/latest -s | jq .name -r) curl -OL "https://github.com/FalcoSuessgott/vkv/releases/download/${version}/vkv_$(uname)_$(uname -m).tar.gz" @@ -7,7 +9,7 @@ chmod u+x vkv ./vkv version ``` -### Packages +## Packages `vkv` is releases RPM- & DEB packages and Windows & MacOS Binaries. You can find and download all artifacts in the [release](https://github.com/FalcoSuessgott/vkv/releases) section. @@ -27,13 +29,13 @@ tar xzf vkv_.tar.gz chmod u+x ./vkv ``` -### Using `go` +## Using `go` ```bash go install github.com/FalcoSuessgott/vkv@latest vkv ``` -### From Sources +## From Sources ```bash # requires go to be installed git clone https://github.com/FalcoSuessgott/vkv @@ -41,7 +43,7 @@ cd vkv go install ``` -### Docker +## Docker ```bash # ghcr.io docker run -e VAULT_ADDR="${VAULT_ADDR}" -e VAULT_TOKEN="${VAULT_TOKEN}" ghcr.io/falcosuessgott/vkv diff --git a/docs/engines/index.md b/docs/list_engines.md similarity index 83% rename from docs/engines/index.md rename to docs/list_engines.md index 5b44efdb..6e16cf07 100644 --- a/docs/engines/index.md +++ b/docs/list_engines.md @@ -1,3 +1,4 @@ +# List Engines ## vkv list engines list all KVv2 engines @@ -15,10 +16,4 @@ vkv list engines [flags] -a, --all list all KV engines recursively from the specified namespaces (env: VKV_LIST_ENGINES_ALL) -f, --format string available output formats: "base", "json", "yaml" (env: VKV_LIST_ENGINES_FORMAT) (default "base") -h, --help help for engines -``` - -### SEE ALSO - -* [vkv list](vkv_list.md) - list namespaces or KV engines - -###### Auto generated by spf13/cobra on 19-Nov-2023 +``` \ No newline at end of file diff --git a/docs/namespaces/index.md b/docs/list_namespaces.md similarity index 81% rename from docs/namespaces/index.md rename to docs/list_namespaces.md index 289865c5..3c6c63a6 100644 --- a/docs/namespaces/index.md +++ b/docs/list_namespaces.md @@ -1,3 +1,5 @@ +# List Namespaces + ## vkv list namespaces list all namespaces @@ -14,10 +16,4 @@ vkv list namespaces [flags] -a, --all list all namespaces recursively from the specified namespace (env: VKV_LIST_NAMESPACES_ALL) -f, --format string available output formats: "base", "json", "yaml" (env: VKV_LIST_NAMESPACES_FORMAT (default "base") -h, --help help for namespaces -``` - -### SEE ALSO - -* [vkv list](vkv_list.md) - list namespaces or KV engines - -###### Auto generated by spf13/cobra on 19-Nov-2023 +``` \ No newline at end of file diff --git a/docs/quickstart/index.md b/docs/quickstart.md similarity index 94% rename from docs/quickstart/index.md rename to docs/quickstart.md index a57d2ae2..addcc515 100644 --- a/docs/quickstart/index.md +++ b/docs/quickstart.md @@ -1,13 +1,14 @@ +# Quickstart This guide will run you through some of the features of `vkv`. -### 0. Prerequsuites +## Prerequisites In order to perform all of the described tasks, you will need the following tools: * a Linux/MacOS Shell * `docker` installed and running (alternatively `vault` CLI can be used) * `vkv` installed (follow https://falcosuessgott.github.io/vkv/02_installation/) -### 01. Spin up a development Vault server +## Spin up a development Vault server First, we setup a development Vault server. Open a terminal and run: @@ -20,7 +21,7 @@ You should then be able to visit `http://127.0.0.1:8200` in your browser and see The `root` token is `root`. -### 02. Verify connection +## Verify connection Once you have exported the required environment variables, you can verify your connection with the vault CLI by running: ```bash @@ -45,7 +46,7 @@ HA Enabled false If `vault status` returned an output like this you good to go to the next step -### 03. Write secrets to Vault using `vault` +## Write secrets to Vault using `vault` In a development Vault server a `KVv2` under `secret/` is enabled by default. We want to write some secrets using `vault`: @@ -56,9 +57,8 @@ vault kv put -mount=secret db/prod env=prod username=user password=passw0rd-prod vault kv put -mount=secret db/dev env=dev username=user password=passw0rd-dev ``` - -### 04. List secrets using `vkv` -`vkv` requires atleast `VAULT_ADDR` and `VAULT_TOKEN` if the `vault status` command works, `vkv` will also work. +## List secrets using `vkv` +`vkv` requires at least `VAULT_ADDR` and `VAULT_TOKEN` if the `vault status` command works, `vkv` will also work. We can now use `vkv` to list all of our secrets recursively: @@ -92,7 +92,7 @@ Here are some explanations: This output format is the default format called `base`. `vkv` has many other useful output formats. -You can see them all using this onliner: +You can see them all using this oneliner: ```bash for f in base yaml json markdown policy export; do @@ -203,7 +203,7 @@ VKV_EXPORT_FORMAT=JSON VKV_EXPORT_SHOW_VALUES=true vkv export -p secret } ``` -### 05. Import secrets using `vkv` +## Import secrets using `vkv` Meanwhile `vkv export` can be used to store secrets, `vkv import` is used to import secrets from a `vkv export` command (either `yaml` or `json` format is accepted). Knowing this, we can copy a secret engine to another secret engine: @@ -241,11 +241,11 @@ vkv export -p secret -f=yaml | VAULT_ADDR="..." VAULT_TOKEN="..." vkv import - - [...] ``` -The `-` tells `vkv` to read the secrets from STDIN. You cal also specifiy a file using the `--file` parameter. +The `-` tells `vkv` to read the secrets from STDIN. You cal also specify a file using the `--file` parameter. `vkv` will create the `KVv2` engine if it doesn't exist. If the engine indeed exists, `vkv` will error unless `--force` is used. -You can also copy subpaths to other engines: +You can also copy sub-paths to other engines: ```bash vkv export -p secret/admin -f=yaml --show-values| vkv import - -p admin @@ -262,7 +262,7 @@ admin/ └── username=**** ``` -### 06. Create KVv2 Snapshots using `vkv` +## Create KVv2 Snapshots using `vkv` `vkv` enables you to create and restore snapshots of all KVv2 engines in all namespaces of a Vault instance (requires an appropiate token + policy): Consider the following namespaces and KVv2 engines on a Vault Enterprise instance: @@ -291,7 +291,7 @@ test/test2/test3/test_test2_test3_secret_2 You can create a snapshot of those KVv2 engines by running: ```bash -vkv snapshot save --destionation vkv-export-$(date '+%Y-%m-%d') +vkv snapshot save --destination vkv-export-$(date '+%Y-%m-%d') created vkv-export-2022-12-29 created vkv-export-2022-12-29/secret.yaml created vkv-export-2022-12-29/secret_2.yaml @@ -308,7 +308,7 @@ created vkv-export-2022-12-29/test/test2/test3/test_test2_test3_secret.yaml created vkv-export-2022-12-29/test/test2/test3/test_test2_test3_secret_2.yaml ``` -As you cann see: `vkv` exported all engines and wrote them to the specified directory: +As you can see: `vkv` exported all engines and wrote them to the specified directory: ```bash vkv-export-2022-12-29/ @@ -360,7 +360,7 @@ cat vkv-export-2022-12-29/secret.yaml You could `.tar.gz` those directories and save those encrypted files in a secure fashion. -### 07. Restore vkv snapshots +## Restore vkv snapshots In order to restore a `vkv` snapshot the `snapshot restore` command is invoked: diff --git a/docs/server/index.md b/docs/server.md similarity index 94% rename from docs/server/index.md rename to docs/server.md index 96a40831..16cc8432 100644 --- a/docs/server/index.md +++ b/docs/server.md @@ -1,7 +1,7 @@ -# server +# Server `vkv server` is a subcommand that starts simple http server that accepts `GET` request `/export` on port `8080` (change using `--port`). -### Options +## Options ``` -P, --port string HTTP Server Port (env: VKV_SERVER_PORT) (default "8080") @@ -43,7 +43,7 @@ secret/ ``` ## Output Format -you can speciy the output format by adding a `format`-URL Query Parameter: +you can specify the output format by adding a `format`-URL Query Parameter: ```bash $> curl localhost:88080/export?format=yaml diff --git a/docs/snapshot/restore.md b/docs/snapshot_restore.md similarity index 66% rename from docs/snapshot/restore.md rename to docs/snapshot_restore.md index 3a8da67c..725a9ecd 100644 --- a/docs/snapshot/restore.md +++ b/docs/snapshot_restore.md @@ -1,3 +1,4 @@ +# Snapshot restore ## vkv snapshot restore restore the KV engines defined in the specified snapshot @@ -12,9 +13,3 @@ vkv snapshot restore [flags] -h, --help help for restore -s, --source string source of a vkv snapshot export (env :VKV_SNAPSHOT_RESTORE_SOURCE) (default "./vkv-snapshot-export") ``` - -### SEE ALSO - -* [vkv snapshot](vkv_snapshot.md) - save or restore a snapshot of all KVv2 engines - -###### Auto generated by spf13/cobra on 19-Nov-2023 diff --git a/docs/snapshot/save.md b/docs/snapshot_save.md similarity index 78% rename from docs/snapshot/save.md rename to docs/snapshot_save.md index 2d7321ba..79f5456f 100644 --- a/docs/snapshot/save.md +++ b/docs/snapshot_save.md @@ -1,3 +1,4 @@ +# Snapshot save ## vkv snapshot save create a snapshot of all visible KV engines recursively for all namespaces @@ -13,10 +14,4 @@ vkv snapshot save [flags] -h, --help help for save -n, --namespace string namespaces from which to save recursively all visible KV engines (env: VKV_SNAPSHOT_SAVE_NS) --skip-errors dont exit on errors (permission denied, deleted secrets) (env: VKV_SNAPSHOT_SAVE_SKIP_ERRORS) -``` - -### SEE ALSO - -* [vkv snapshot](vkv_snapshot.md) - save or restore a snapshot of all KVv2 engines - -###### Auto generated by spf13/cobra on 19-Nov-2023 +``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 55cebfa1..eff3a04e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,32 +15,34 @@ plugins: enable_creation_date: false nav: - - vkv: index.md - - Quickstart: quickstart/index.md - - Installation: installation/index.md - - Authentication: authentication/index.md - - Configuration: configuration/index.md - - Export: - - Export: export/index.md - - Export Formats: export/formats.md - - Import: import/index.md - - Snapshots: - - Snapshot Save: snapshot/save.md - - Snapshot Restore: snapshot/restore.md - - List Namespaces: namespaces/index.md - - List Engines: engines/index.md - - Server: server/index.md - - Advanced Examples: - - advanced_examples/diff.md - - advanced_examples/fzf.md - - advanced_examples/kubernetes.md - - advanced_examples/sops.md - - advanced_examples/direnv.md - - CI/CD Integrations: - - cicd/gitlab.md - - cicd/github.md - - cicd/azure.md - - Development: development/index.md + - vkv: + - index.md + - quickstart.md + - installation.md + - authentication.md + - configuration.md + - Export: + - export.md + - export_formats.md + - import.md + - Snapshots: + - snapshot_save.md + - snapshot_restore.md + - List: + - list_namespaces.md + - list_engines.md + - server.md + - Advanced Examples: + - example_diff.md + - example_fzf.md + - example_kubernetes.md + - example_sops.md + - example_direnv.md + - CI/CD Integrations: + - cicd_gitlab.md + - cicd_github.md + - cicd_azure.md + - development.md markdown_extensions: - pymdownx.superfences: @@ -54,9 +56,6 @@ markdown_extensions: line_spans: __span pygments_lang_class: true - pymdownx.snippets - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg - pymdownx.inlinehilite - admonition - def_list @@ -106,4 +105,9 @@ theme: - content.action.edit - navigation.top - navigation.expand - - navigation.footer \ No newline at end of file + - navigation.footer + +extra: + analytics: + provider: google + property: G-7LC1CWDZ0M \ No newline at end of file