apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: secret-collector-examples
spec:
  collectors:
    # Basic secret collection (no key-value data included)
    - secret:
        collectorName: basic-secret
        name: my-app-config
        namespace: default

    # Collect specific key with value
    - secret:
        collectorName: specific-key-with-value
        name: my-app-config
        namespace: default
        key: database-password
        includeValue: true

    # NEW: Collect all key-value pairs from a secret
    - secret:
        collectorName: all-secret-data
        name: my-app-config
        namespace: default
        includeAllData: true

    # NEW: Collect all key-value pairs AND a specific key (combined approach)
    - secret:
        collectorName: combined-collection
        name: my-app-config
        namespace: default
        key: database-password
        includeValue: true
        includeAllData: true

    # NEW: Collect all secrets matching a selector with all their data
    - secret:
        collectorName: secrets-by-selector-all-data
        namespace: default
        selector:
          - app=my-app
        includeAllData: true

    # Collect secrets by selector (traditional approach)
    - secret:
        collectorName: secrets-by-selector-basic
        namespace: default
        selector:
          - app=my-app
