init-vault

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

Init Vault

License golang version

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 ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL