openbao

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package openbao 는 OpenBao KV 논리 export/import 어댑터다.

설계: docs/11_기능설계/Nullus_백업복구_설계.md §3.2 (nullus-plan#75)

raft snapshot API 를 쓰지 않는(못 쓰는) 이유: 스택의 OpenBao 는 단일 replica 라 raft 대신 file 스토리지를 쓴다(internal/stack/adapter/helm/ openbao-values.go:78). `bao operator raft snapshot` 은 raft 전용이다.

그래서 KV 경로를 재귀 순회해 값을 내보낸다. 봉인이 필요 없어 무중단이고, 포맷이 안정적이라 버전 이식도 가능하다. 대신 KV v2 의 버전 이력은 최신본만 남는다 — 그 한계는 설계에 기록돼 있다.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVExporter

type KVExporter struct {
	// contains filtered or unexported fields
}

func NewKVExporter

func NewKVExporter(resolver Resolver) *KVExporter

func (*KVExporter) Export

func (e *KVExporter) Export(ctx context.Context, stackID string, out io.Writer) (port.KVExportResult, error)

func (*KVExporter) Import

func (e *KVExporter) Import(ctx context.Context, stackID string, in io.Reader) error

func (*KVExporter) PathExists

func (e *KVExporter) PathExists(ctx context.Context, stackID, path string) (bool, error)

PathExists 는 참조 정합성 검사에 쓴다 (§6.4).

type Resolver

type Resolver interface {
	ForStack(ctx context.Context, provider, stackID string) (secrets.Store, error)
}

Resolver 는 스택 ID 로 그 스택의 OpenBao Store 를 만든다.

OpenBao 는 스택마다 배포되므로 전역 인스턴스 하나를 가정할 수 없다 (internal/shared/secrets/store.go:23). secrets.Router 가 이 모양을 만족한다.

Jump to

Keyboard shortcuts

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