mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-08-27 00:37:20 +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
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
apiVersion: troubleshoot.sh/v1beta3
|
|
kind: SupportBundle
|
|
metadata:
|
|
name: optional-secrets-example
|
|
spec:
|
|
collectors:
|
|
# Required database - collection will fail if secret doesn't exist
|
|
- postgres:
|
|
collectorName: required-db
|
|
uri:
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: required-postgres
|
|
key: uri
|
|
optional: false # Default behavior - secret must exist
|
|
|
|
# Optional database - collection continues if secret doesn't exist
|
|
- postgres:
|
|
collectorName: optional-db
|
|
uri:
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: optional-postgres
|
|
key: uri
|
|
optional: true # Gracefully degrades if secret is missing
|
|
|
|
# Mixed required and optional TLS
|
|
- postgres:
|
|
collectorName: partially-optional
|
|
uri: "postgresql://localhost:5432/db"
|
|
tls:
|
|
cacert:
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: tls-certs
|
|
key: ca.crt
|
|
optional: false # CA cert is required
|
|
clientCert:
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: tls-certs
|
|
key: client.crt
|
|
optional: true # Client cert is optional (cert-only TLS)
|
|
clientKey:
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: tls-certs
|
|
key: client.key
|
|
optional: true # Client key is optional
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: required-postgres
|
|
type: Opaque
|
|
stringData:
|
|
uri: "postgresql://user:pass@required-postgres:5432/db"
|
|
# Note: optional-postgres secret intentionally not created
|