vault-sync-operator

Vault Sync Operator Examples

This directory contains example configurations demonstrating various features of the Vault Sync Operator.

Deployment-Based Sync Examples

These examples show how to sync secrets to Vault based on Deployment annotations.

Direct Secret Sync Examples

These examples show how to sync secrets directly to Vault using Secret annotations.

Usage

Apply any example with:

kubectl apply -f examples/basic-example.yaml

Configuration Patterns

Deployment-Based Sync

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    vault-sync.io/path: "secret/data/my-app"
    # Optional custom configuration:
    vault-sync.io/secrets: |
      [{"name": "my-secret", "keys": ["key1"], "prefix": "app_"}]

Direct Secret Sync

apiVersion: v1
kind: Secret
metadata:
  annotations:
    vault-sync.io/path: "secret/data/my-secret"
    # Optional custom configuration:
    vault-sync.io/secrets: |
      [{"name": "my-secret", "keys": ["key1"], "prefix": "prod_"}]

Monitoring

See grafana-dashboard.json for a comprehensive monitoring dashboard that tracks both deployment and secret sync operations.

Notes