apiVersion: troubleshoot.sh/v1beta3
kind: SupportBundle
metadata:
  name: cross-namespace-example
spec:
  collectors:
    # Database in one namespace, secret in another
    - postgres:
        collectorName: shared-database
        uri:
          valueFrom:
            secretKeyRef:
              name: shared-postgres-connection
              key: uri
              namespace: shared-services  # Secret is in a different namespace

    # Redis accessing centralized credentials
    - redis:
        collectorName: shared-cache
        uri:
          valueFrom:
            secretKeyRef:
              name: shared-redis-creds
              key: uri
              namespace: platform-credentials
---
# This secret would be in the 'shared-services' namespace
apiVersion: v1
kind: Secret
metadata:
  name: shared-postgres-connection
  namespace: shared-services
type: Opaque
stringData:
  uri: "postgresql://shared:password@shared-postgres.shared-services.svc:5432/shared_db"
---
# This secret would be in the 'platform-credentials' namespace
apiVersion: v1
kind: Secret
metadata:
  name: shared-redis-creds
  namespace: platform-credentials
type: Opaque
stringData:
  uri: "redis://shared-redis.shared-services.svc:6379/0"
