🔐 Vault Sync Operator

Kubernetes Operator HashiCorp Vault Secret Management

A Kubernetes operator that automatically syncs secrets from Kubernetes to HashiCorp Vault using annotations on Deployments.

🚀 Quick Start: Get up and running in minutes with automatic secret synchronization to Vault!

✨ Key Features

📥 Installation

Add the Helm repository and install the operator:

# Add the repository
helm repo add vault-sync-operator https://danieldonoghue.github.io/vault-sync-operator/
helm repo update

# Install the operator
helm install vault-sync-operator vault-sync-operator/vault-sync-operator \
  --namespace vault-sync-operator-system \
  --create-namespace \
  --set vault.address="http://<vault-ip-address>:8200"

⚙️ Configuration Options

Required Configuration:

Optional Configuration:

🚀 Alternative Installation Methods

The operator supports multiple deployment methods:

📝 Usage Examples

🔄 Auto-Discovery Mode (Recommended)

Automatically discovers all secrets referenced in your deployment:

metadata:
  annotations:
    vault-sync.io/path: "secret/data/my-app"
    # All secrets referenced in pod template will be synced

⚙️ Custom Configuration Mode

Specify exact secrets and keys to sync:

metadata:
  annotations:
    vault-sync.io/path: "secret/data/my-app"
    vault-sync.io/secrets: |
      [
        {
          "name": "my-app-secrets",
          "keys": ["username", "password"],
          "prefix": "app_"
        }
      ]

🚀 Advanced Features

metadata:
  annotations:
    vault-sync.io/path: "secret/data/my-app"
    vault-sync.io/preserve-on-delete: "true"  # Don't delete from Vault
    vault-sync.io/reconcile: "5m"            # Check every 5 minutes
    vault-sync.io/rotation-check: "enabled"  # Detect secret changes

📊 Monitoring & Observability

The operator provides comprehensive monitoring capabilities:

Access metrics (with authentication):

# Get service account token
TOKEN=$(kubectl create token vault-sync-operator-controller-manager -n vault-sync-operator-system)

# Access metrics
kubectl port-forward -n vault-sync-operator-system svc/vault-sync-operator-controller-manager-metrics-service 8080:8080
curl -H "Authorization: Bearer $TOKEN" http://localhost:8080/metrics

🔧 Troubleshooting

Common debugging commands:

# Check operator logs
kubectl logs -n vault-sync-operator-system deployment/vault-sync-operator-controller-manager

# Verify deployment annotations
kubectl get deployment <name> -o yaml | grep -A 10 annotations

# Check health endpoints
kubectl port-forward -n vault-sync-operator-system deployment/vault-sync-operator-controller-manager 8081:8081
curl http://localhost:8081/healthz
curl http://localhost:8081/readyz

📚 Documentation

📋 Quick Reference

Essential Links:

📊 Available Charts

Check the index.yaml for all available chart versions.

🆘 Support

Issues: GitHub Issues


Generated automatically from danieldonoghue/vault-sync-operator