Commit d0f3a60
committed
Add Kubernetes secret support for secure Kafka connections
Operator Enhancements:
- Add SecretReference struct to CRD for referencing K8s secrets
- Support secret refs in SSL config (CA, client cert, key, key password)
- Support secret refs in SASL config (username, password, keytab)
- Automatically mount secrets as volumes in pipeline pods
- Secrets mounted at /etc/streamforge/secrets/ with 0400 permissions
CRD Changes (operator/src/crd.rs):
- Add caSecret, certificateSecret, keySecret, keyPasswordSecret to SslConfig
- Add usernameSecret, passwordSecret, keytabSecret to SaslConfig
- Each secret ref contains name and key fields
Reconciler Changes (operator/src/reconciler.rs):
- New add_secret_volumes() method to collect and mount secrets
- Collect secrets from source and all destinations
- Create volume and volume mount for each unique secret
- Support for multiple secrets across different security configs
Documentation:
- Add SECRETS.md - Comprehensive secret management guide
- Add secure-sasl-pipeline.yaml - SASL authentication example
- Add secure-tls-pipeline.yaml - Mutual TLS example
- Update pipelines/README.md with security examples
Benefits:
✅ Store credentials securely in etcd (encrypted)
✅ Separate config from secrets
✅ RBAC control for secret access
✅ Easy credential rotation without changing pipelines
✅ Audit trail for secret access
✅ Support for external secret managers (AWS Secrets Manager, etc.)
This addresses the production security requirement for handling
sensitive Kafka credentials (passwords, certificates, keytabs).1 parent caf8319 commit d0f3a60
6 files changed
Lines changed: 736 additions & 5 deletions
File tree
- examples/pipelines
- operator/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
23 | 73 | | |
24 | 74 | | |
25 | 75 | | |
| |||
0 commit comments