mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
* Uses secrets from cluster * updated gitignore to stop ignoring needed files * Delete specs.go.bak * make fmt * added preflight to generic loader * Tells user to run in cluster if using secretKeyRef * Update loader.go * Update loader.go
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
apiVersion: troubleshoot.sh/v1beta3
|
|
kind: SupportBundle
|
|
metadata:
|
|
name: configmap-example
|
|
spec:
|
|
collectors:
|
|
# Database URI from ConfigMap (non-sensitive connection string)
|
|
- postgres:
|
|
collectorName: dev-database
|
|
uri:
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: database-config
|
|
key: dev-connection-uri
|
|
|
|
# Redis URI from ConfigMap
|
|
- redis:
|
|
collectorName: dev-redis
|
|
uri:
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: cache-config
|
|
key: redis-uri
|
|
|
|
# Mixed: URI from ConfigMap, password from Secret
|
|
# Note: This shows the limitation - you can't compose values from multiple sources
|
|
# The full connection string must be in one place
|
|
- mysql:
|
|
collectorName: staging-mysql
|
|
uri:
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mysql-secret
|
|
key: complete-connection-string
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: database-config
|
|
data:
|
|
dev-connection-uri: "postgresql://devuser@dev-postgres.default.svc:5432/devdb"
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: cache-config
|
|
data:
|
|
redis-uri: "redis://dev-redis.default.svc:6379/0"
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: mysql-secret
|
|
type: Opaque
|
|
stringData:
|
|
# Complete connection string with password included
|
|
complete-connection-string: "mysql://staging:stagingpass@staging-mysql:3306/stagingdb"
|