repositorypackage
0.2.0
Repository: https://github.com/nautes-labs/init-vault.git
Documentation: pkg.go.dev
# README
Init Vault
Init-vault is a command line application for user to init vault data struct.
Introduction
It will:
- auto create/remove kv engine
- auto create/remove kv under engine
- auto create/remove auth in vault and bind it to the dest kubernetes
- auto create/remove role in vault and needed namespace, service account in kubernetes
- auto create/remove policy in vault
Quick Started
Buiding
Clone the repo and enter the root path, run following command.
go build
Usage
Init vault
cat <<EOT >> config.yaml
host: "vault_url"
capath: "/vault/ca/path"
EOT
./init-vault --vault-config config.yaml unseal --export-path /tmp/unseal.yml
Init vault data
# Edit this file
cp config/vault.yaml.example vault.yaml
# init the vault
./init-vault --vault-config vault.yaml init
# Clean up the vault
./init-vault --vault-config vault.yaml clean
Unit Testing
go test -v ./...