# Sample YAML File: Multi-Document Stream
# Provided by Sample-Files.com
# Multiple independent YAML documents in one file, separated by ---

# Document 1: Application metadata
---
apiVersion: v1
kind: metadata
application:
  name: SampleApp
  version: 3.2.1
  description: A sample multi-document YAML file
  maintainers:
    - name: Alice Chen
      email: alice@example.com
      role: lead
    - name: Bob Martinez
      email: bob@example.com
      role: contributor
  license: MIT
  repository: https://github.com/example/sampleapp
...

# Document 2: Server configuration
---
apiVersion: v1
kind: server-config
server:
  host: 0.0.0.0
  port: 8080
  workers: 4
  ssl:
    enabled: true
    cert: /etc/ssl/certs/app.crt
    key: /etc/ssl/private/app.key
  cors:
    origins:
      - https://app.example.com
      - https://admin.example.com
    methods: [GET, POST, PUT, DELETE]
...

# Document 3: Database configuration
---
apiVersion: v1
kind: database-config
database:
  primary:
    host: db.example.com
    port: 5432
    name: sampleapp
    pool_size: 20
  replica:
    host: db-replica.example.com
    port: 5432
    name: sampleapp
    pool_size: 10
  migrations:
    auto_run: false
    directory: ./migrations
...

# Document 4: Feature flags
---
apiVersion: v1
kind: feature-flags
features:
  dark_mode:
    enabled: true
    rollout_percentage: 100
  new_checkout:
    enabled: true
    rollout_percentage: 50
    allowed_users: [1, 42, 99, 105]
  ai_search:
    enabled: false
    rollout_percentage: 0
    notes: "Pending security review"
...

# Document 5: Monitoring and alerts
---
apiVersion: v1
kind: monitoring-config
monitoring:
  metrics:
    enabled: true
    port: 9090
    path: /metrics
    interval: 15s
  alerts:
    - name: high_error_rate
      condition: "error_rate > 0.05"
      severity: critical
      channels: [pagerduty, slack]
    - name: slow_response
      condition: "p99_latency > 2000"
      severity: warning
      channels: [slack]
    - name: high_memory
      condition: "memory_usage > 0.9"
      severity: warning
      channels: [slack, email]
  dashboards:
    - name: overview
      url: https://grafana.example.com/d/overview
    - name: api-performance
      url: https://grafana.example.com/d/api-perf
...
