# Default values for matcher components.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
nameOverride: "matcher"
fullnameOverride: ""
namespaceOverride: "matcher"

global:
  # -- Bootstrap job for external PostgreSQL: creates databases, roles, and grants privileges
  externalPostgresDefinitions:
    # -- Enable or disable the PostgreSQL bootstrap job
    enabled: false
    # -- PostgreSQL connection settings
    connection:
      # -- PostgreSQL host
      host: "matcher-postgresql-primary"
      # -- PostgreSQL port
      port: "5432"
    # -- Admin credentials for PostgreSQL
    postgresAdminLogin:
      useExistingSecret:
        # -- Name of existing secret containing DB_USER_ADMIN and DB_ADMIN_PASSWORD keys
        name: ""
      # -- Admin username (ignored if useExistingSecret.name is set)
      username: "postgres"
      # -- Admin password (ignored if useExistingSecret.name is set)
      password: ""
    # -- Credentials for matcher role created by the job
    matcherCredentials:
      useExistingSecret:
        # -- Name of existing secret containing DB_PASSWORD_MATCHER key
        name: ""
      # -- Password for matcher role (ignored if useExistingSecret.name is set)
      password: ""

  # -- Bootstrap job for external RabbitMQ: creates users, vhosts, and permissions
  externalRabbitmqDefinitions:
    # -- Enable or disable the RabbitMQ bootstrap job
    enabled: false
    # -- RabbitMQ connection settings
    connection:
      # -- RabbitMQ management API protocol. The bootstrap Job sends
      # administrator credentials, so "https" is required; "http" is refused
      # at render time unless allowInsecureHttp is set.
      protocol: "https"
      # -- Explicit opt-in to sending bootstrap credentials over cleartext
      # HTTP (not recommended; only for isolated/dev environments).
      allowInsecureHttp: false
      # -- RabbitMQ host (management API endpoint)
      host: "matcher-rabbitmq"
      # -- RabbitMQ HTTP management port
      port: "15672"
      # -- RabbitMQ AMQP port (for connectivity check)
      portAmqp: "5672"
      # -- Optional PEM CA bundle for verifying the management API's TLS
      # certificate (private PKI). Certificate verification is always on.
      caBundle: ""
    # -- Admin credentials for RabbitMQ management API
    rabbitmqAdminLogin:
      useExistingSecret:
        # -- Name of existing secret containing RABBITMQ_ADMIN_USER and RABBITMQ_ADMIN_PASS keys
        name: ""
      # -- Admin username (ignored if useExistingSecret.name is set)
      username: "admin"
      # -- Admin password (ignored if useExistingSecret.name is set)
      password: ""
    # -- Credentials for matcher user created by the job
    matcherCredentials:
      useExistingSecret:
        # -- Name of existing secret containing RABBITMQ_MATCHER_PASS key
        name: ""
      # -- Password for matcher user (ignored if useExistingSecret.name is set)
      password: ""

matcher:
  # -- Health preset (lerian-common.health): probes, grace, drain, rollout strategy and PDB are owned by the preset.
  # Tune only drainSeconds (default 15) and shutdownSeconds (default 30); grace = drain + shutdown + 10.
  health:
    stack: go
  # -- Service name
  name: matcher

  # -- Enable or disable the matcher service
  enabled: true

  # -- Number of replicas for the matcher service
  replicaCount: 2

  # -- Number of old ReplicaSets to retain for deployment rollback
  revisionHistoryLimit: 10

  image:
    # -- Repository for the matcher service container image
    repository: lerianstudio/matcher
    # -- Image pull policy
    pullPolicy: IfNotPresent
    # -- Image tag used for deployment
    tag: "6.1.0"

  # -- Secrets for pulling images from a private registry
  imagePullSecrets: []

  # -- Overrides the default generated name by Helm
  nameOverride: ""
  # -- Overrides the full name generated by Helm
  fullnameOverride: ""

  # -- Pod annotations for additional metadata
  podAnnotations: {}

  podSecurityContext: {}
    # fsGroup: 2000

  securityContext:
    # -- Defines the group ID for the user running the process inside the container
    runAsGroup: 1000
    # -- Defines the user ID for the process running inside the container
    runAsUser: 1000
    # -- Ensures the process does not run as root
    runAsNonRoot: true
    capabilities:
      drop:
        - ALL
    allowPrivilegeEscalation: false
    # -- Defines the root filesystem as read-only
    readOnlyRootFilesystem: true
    seccompProfile:
      type: RuntimeDefault

  # -- PodDisruptionBudget configuration
  pdb:
    # -- Annotations for the PodDisruptionBudget
    annotations: {}

  service:
    # -- Kubernetes service type
    type: ClusterIP
    # -- Port for the HTTP API
    port: 8080
    annotations: {}

  ingress:
    # -- Enable or disable ingress
    enabled: false
    # -- Ingress class name
    className: ""
    # -- Additional ingress annotations
    annotations: {}
    hosts:
      - host: ""
        paths:
          - path: /
            pathType: Prefix
    # -- TLS configuration for ingress
    tls: []
    #  - secretName: chart-example-tls
    #    hosts:
    #      - chart-example.local

  resources:
    # -- CPU and memory limits for pods
    limits:
      cpu: 1500m
      memory: 512Mi
    # -- Minimum CPU and memory requests
    requests:
      cpu: 500m
      memory: 256Mi

  autoscaling:
    # -- Enable or disable horizontal pod autoscaling
    enabled: true
    # -- Minimum number of replicas
    minReplicas: 2
    # -- Maximum number of replicas
    maxReplicas: 5
    # -- Target CPU utilization percentage for autoscaling
    targetCPUUtilizationPercentage: 80
    targetMemoryUtilizationPercentage: 80

  # -- Node selector for scheduling pods on specific nodes
  nodeSelector: {}

  # -- Tolerations for scheduling on tainted nodes
  tolerations: []

  # -- Affinity rules for pod scheduling
  affinity: {}

  # -- ConfigMap for environment variables and configurations
  # @default -- templates/configmap.yaml
  configmap:
    ALLOW_INSECURE_TLS: "true"
    # Application Settings
    # DEPLOYMENT_MODE is REQUIRED and has no default; the render fails without it.
    #   saas  - Lerian-hosted, multi-tenant
    #   byoc  - client-hosted
    #   local - development posture (admits http webhooks)
    # saas and byoc will refuse to boot without IDEMPOTENCY_HMAC_SECRET once the app enforces it.
    ENV_NAME: "production"
    LOG_LEVEL: "info"
    SERVER_ADDRESS: ":8080"
    HTTP_BODY_LIMIT_BYTES: "104857600"
    # Go soft memory limit (opt-in, no default). Set ~85% of the pod memory limit;
    # Go 1.26 does not auto-detect cgroup limits. Only emitted when non-empty.
    # GOMEMLIMIT: "435MiB"

    # CORS Configuration
    CORS_ALLOWED_ORIGINS: "*"
    CORS_ALLOWED_METHODS: "GET,POST,PUT,PATCH,DELETE,OPTIONS"
    CORS_ALLOWED_HEADERS: "Origin,Content-Type,Accept,Authorization,X-Request-ID"

    # TLS Configuration
    TLS_TERMINATED_UPSTREAM: "true"

    # Multi-Tenancy
    DEFAULT_TENANT_ID: "11111111-1111-1111-1111-111111111111"
    DEFAULT_TENANT_SLUG: "default"
    # -- Enable multi-tenant mode (requires tenant manager service)
    MULTI_TENANT_ENABLED: "false"
    # Emitted only when MULTI_TENANT_ENABLED="true", so no defaults live here (a
    # value here would reach the pod with multi-tenancy off). When enabled:
    #   MULTI_TENANT_URL: ""                            # tenant manager URL, required
    #   MULTI_TENANT_ENVIRONMENT: ""                    # tenant manager environment id
    #   MULTI_TENANT_MAX_TENANT_POOLS: "100"            # chart default
    #   MULTI_TENANT_IDLE_TIMEOUT_SEC: "300"            # chart default
    #   MULTI_TENANT_CIRCUIT_BREAKER_THRESHOLD: "5"     # chart default
    #   MULTI_TENANT_CIRCUIT_BREAKER_TIMEOUT_SEC: "30"  # chart default

    # PostgreSQL Primary
    # -- Leave empty to derive from the postgresql subchart's primary Service name (release-aware)
    POSTGRES_HOST: ""
    POSTGRES_PORT: "5432"
    POSTGRES_USER: "matcher"
    POSTGRES_DB: "matcher"
    POSTGRES_SSLMODE: "disable"
    POSTGRES_MAX_OPEN_CONNS: "25"
    POSTGRES_MAX_IDLE_CONNS: "5"
    POSTGRES_CONN_MAX_LIFETIME_MINS: "30"
    POSTGRES_CONN_MAX_IDLE_TIME_MINS: "5"
    POSTGRES_CONNECT_TIMEOUT_SEC: "10"
    POSTGRES_QUERY_TIMEOUT_SEC: "30"

    # PostgreSQL Replica (optional - for CQRS read scaling)
    # -- Leave empty to derive from the postgresql subchart's read-replica Service name (release-aware)
    POSTGRES_REPLICA_HOST: ""
    POSTGRES_REPLICA_PORT: "5432"
    POSTGRES_REPLICA_USER: "matcher"
    POSTGRES_REPLICA_DB: "matcher"
    POSTGRES_REPLICA_SSLMODE: "disable"

    # Infrastructure Boot Timeout
    INFRA_CONNECT_TIMEOUT_SEC: "30"

    # Redis/Valkey Configuration
    # -- Leave empty to derive from the valkey subchart's primary Service name (release-aware)
    REDIS_HOST: ""
    REDIS_DB: "0"
    REDIS_POOL_SIZE: "10"
    REDIS_MIN_IDLE_CONNS: "2"
    REDIS_READ_TIMEOUT_MS: "3000"
    REDIS_WRITE_TIMEOUT_MS: "3000"
    REDIS_DIAL_TIMEOUT_MS: "5000"
    REDIS_TLS: "false"

    # RabbitMQ Configuration
    RABBITMQ_URI: "amqp"
    # -- Leave empty to derive from the rabbitmq subchart's Service name (release-aware)
    RABBITMQ_HOST: ""
    RABBITMQ_PORT: "5672"
    RABBITMQ_USER: "matcher"
    RABBITMQ_VHOST: "/"
    # -- Leave empty to derive from the rabbitmq subchart's Service name (release-aware)
    RABBITMQ_HEALTH_URL: ""

    # Authentication (delegated to plugin-auth in app v4). Canonical knobs:
    # PLUGIN_AUTH_ENABLED (effective default "false") and PLUGIN_AUTH_ADDRESS
    # (effective default the in-cluster plugin-access-manager URL). Leave EMPTY to
    # take the default: the configmap template resolves empty -> legacy AUTH_ENABLED /
    # AUTH_SERVICE_ADDRESS (fallback for migration) -> hard default. Setting a
    # non-empty value here overrides the legacy fallback.
    PLUGIN_AUTH_ENABLED: ""
    PLUGIN_AUTH_ADDRESS: ""

    # Permission declaration (RI). The API publishes its permission manifest to
    # the Access Manager at boot (lib-auth declaration.WireFromEnv); off unless
    # "true". Every key here reaches the ConfigMap (an empty one too), so these
    # stay commented until you turn it on. IDP_M2M_CLIENT_ID/SECRET go in
    # `secrets:` below. With the gate on the boot aborts without IDP_HOST, the
    # client pair, and authentication on.
    # IDP_DECLARATION_ENABLED: "true"
    # IDP_HOST: "http://plugin-access-manager-identity:4001"

    # Public base URL: the externally advertised host and scheme preference used to
    # build the inbound webhook and callback URLs vendors call back on -- NOT the
    # bind address, which is SERVER_ADDRESS. Empty PUBLIC_BASE_SCHEMES renders "https".
    PUBLIC_BASE_HOST: ""
    PUBLIC_BASE_SCHEMES: ""

    # Swagger Documentation
    SWAGGER_ENABLED: "false"

    # OpenTelemetry
    # -- Enable telemetry collection (when true, OTEL_EXPORTER_OTLP_ENDPOINT is overridden with HOST_IP:4317)
    ENABLE_TELEMETRY: "false"
    # -- OTEL library name for instrumentation
    OTEL_LIBRARY_NAME: "github.com/LerianStudio/matcher"
    # -- OTEL resource service name for traces/metrics
    OTEL_RESOURCE_SERVICE_NAME: "matcher"
    # -- OTEL exporter endpoint (empty when disabled; overridden by HOST_IP:4317 when ENABLE_TELEMETRY=true)
    OTEL_EXPORTER_OTLP_ENDPOINT: ""
    # -- OTEL resource deployment environment
    OTEL_RESOURCE_DEPLOYMENT_ENVIRONMENT: "production"

    # Rate Limiting
    RATE_LIMIT_ENABLED: "true"
    RATE_LIMIT_MAX: "100"
    RATE_LIMIT_EXPIRY_SEC: "60"
    EXPORT_RATE_LIMIT_MAX: "10"
    EXPORT_RATE_LIMIT_EXPIRY_SEC: "60"
    DISPATCH_RATE_LIMIT_MAX: "50"
    DISPATCH_RATE_LIMIT_EXPIRY_SEC: "60"

    # Database Metrics
    DB_METRICS_INTERVAL_SEC: "15"

    # Idempotency & Deduplication
    IDEMPOTENCY_RETRY_WINDOW_SEC: "300"
    IDEMPOTENCY_SUCCESS_TTL_HOURS: "168"
    DEDUPE_TTL_SEC: "3600"

    # Object Storage (S3-compatible)
    # -- Leave empty to derive a namespace-aware default (matcher-seaweedfs in the release namespace)
    OBJECT_STORAGE_ENDPOINT: ""
    OBJECT_STORAGE_REGION: "us-east-1"
    OBJECT_STORAGE_BUCKET: "matcher-exports"
    OBJECT_STORAGE_USE_PATH_STYLE: "true"

    # Export Worker (runs as goroutine in same process)
    EXPORT_WORKER_ENABLED: "true"
    EXPORT_WORKER_POLL_INTERVAL_SEC: "5"
    EXPORT_WORKER_PAGE_SIZE: "1000"
    EXPORT_PRESIGN_EXPIRY_SEC: "3600"

    # Webhook Configuration
    WEBHOOK_TIMEOUT_SEC: "30"

    # Callback Rate Limiting
    CALLBACK_RATE_LIMIT_PER_MIN: "60"

    # Cleanup Worker
    CLEANUP_WORKER_ENABLED: "true"
    CLEANUP_WORKER_INTERVAL_SEC: "3600"
    CLEANUP_WORKER_BATCH_SIZE: "100"
    CLEANUP_WORKER_GRACE_PERIOD_SEC: "3600"

    # Scheduler
    SCHEDULER_INTERVAL_SEC: "60"

    # Archival Worker (disabled by default)
    ARCHIVAL_WORKER_ENABLED: "false"
    # ARCHIVAL_WORKER_INTERVAL_HOURS: "24"
    # ARCHIVAL_HOT_RETENTION_DAYS: "90"
    # ARCHIVAL_WARM_RETENTION_MONTHS: "24"
    # ARCHIVAL_COLD_RETENTION_MONTHS: "84"
    # ARCHIVAL_BATCH_SIZE: "5000"
    # ARCHIVAL_STORAGE_BUCKET: ""
    # ARCHIVAL_STORAGE_CLASS: "GLACIER"
    # ARCHIVAL_PARTITION_LOOKAHEAD: "3"
    # ARCHIVAL_PRESIGN_EXPIRY_SEC: "3600"

  # -- Secrets for storing sensitive data
  # @default -- templates/secrets.yaml
  secrets:
    # -- PostgreSQL primary password. Single-sourced from the postgresql subchart Secret
    # (<release>-postgresql / password). Only set this for external PostgreSQL without an
    # existingSecret; for internal PostgreSQL leave it empty (the subchart generates it).
    POSTGRES_PASSWORD: ""
    # -- PostgreSQL replica password. Single-sourced from the postgresql subchart Secret
    # (<release>-postgresql / password: matcher logs in to the replica as the matcher user).
    # Only set this for external PostgreSQL
    # without an existingSecret; for internal PostgreSQL leave it empty.
    POSTGRES_REPLICA_PASSWORD: ""
    # -- Redis/Valkey password. Single-sourced from the valkey subchart Secret
    # (<release>-valkey / valkey-password). Only set this for external Valkey without an
    # existingSecret; for internal Valkey leave it empty (the subchart generates it).
    REDIS_PASSWORD: ""
    # -- RabbitMQ password (operator-provided). For the bundled RabbitMQ this value is
    # also injected into the imported load definitions as the matcher user's password,
    # so the broker and the app stay in sync. Required for external RabbitMQ without
    # an existingSecret.
    RABBITMQ_PASSWORD: ""
    # -- Object Storage access key
    OBJECT_STORAGE_ACCESS_KEY_ID: ""
    # -- Object Storage secret key
    OBJECT_STORAGE_SECRET_ACCESS_KEY: ""
    # -- Engine credential master key (base64 32-byte). REQUIRED in production.
    # Generate with: openssl rand -base64 32 | tr -d '\n'. Emitted only when set.
    APP_ENC_KEY: ""
    # -- Actor PII encryption key (optional, base64 32-byte). Emitted only when set.
    ACTOR_PII_ENCRYPTION_KEY: ""
    # -- Broker SASL username (lib-streaming). Emitted only when set. The non-secret
    # STREAMING_* knobs (STREAMING_ENABLED, STREAMING_BROKERS, STREAMING_CLOUDEVENTS_SOURCE,
    # STREAMING_TLS_ENABLED, STREAMING_SASL_MECHANISM, ...) go through matcher.extraEnvVars.
    STREAMING_SASL_USERNAME: ""
    # -- Broker SASL password (lib-streaming). Emitted only when set.
    STREAMING_SASL_PASSWORD: ""
    # -- Broker CA certificate for a private CA, base64(PEM) — the lib-streaming wire
    # contract. Emitted only when set.
    STREAMING_TLS_CA_CERT: ""
    # -- HMAC secret for signing idempotency keys (optional)
    IDEMPOTENCY_HMAC_SECRET: ""
    # -- Licence key (Keygen). Unused when matcher.licenseFile.existingSecret is set.
    LICENSE_KEY: ""
    # -- Multi-tenant service API key (optional, required when MULTI_TENANT_ENABLED=true)
    MULTI_TENANT_SERVICE_API_KEY: ""
    # -- RI declaration M2M client ID (required when configmap.IDP_DECLARATION_ENABLED is "true"). Emitted only when set.
    IDP_M2M_CLIENT_ID: ""
    # -- RI declaration M2M client secret (required when configmap.IDP_DECLARATION_ENABLED is "true"). Emitted only when set.
    IDP_M2M_CLIENT_SECRET: ""

  licenseFile:
    # -- Operator-created Secret holding the signed licence file (key `license.lic`), mounted as a
    # directory at /etc/lerian/license on the app and the migration Job. Replaces LICENSE_KEY;
    # needs an image on lib-license-go v5.
    existingSecret: ""

  # -- Existing secrets name
  useExistingSecret: false
  existingSecretName: ""

  # -- Extra environment variables
  extraEnvVars: []

  serviceAccount:
    # -- Specifies whether a ServiceAccount should be created
    create: true
    # -- Annotations for the ServiceAccount
    annotations: {}
    # -- Name of the service account
    # @default -- `matcher.fullname`
    name: ""

# =============================================================================
# Detached migrations (matcher-migrations) — ArgoCD PreSync Secret + Job that
# applies the schema (up-only, single-tenant) before the app Deployment.
# Disabled by default. With the bundled PostgreSQL the Job reads the subchart
# Secret; external PG needs an operator-provided Postgres password or
# matcher.useExistingSecret pointing at a pre-created Secret.
# =============================================================================
migrations:
  # -- Enable the detached migration PreSync Job
  enabled: false
  image:
    # -- Migration runner image repository
    repository: ghcr.io/lerianstudio/matcher-migrations
    # -- Migration image tag (empty -> falls back to matcher.image.tag)
    tag: ""
    # -- Image pull policy
    pullPolicy: IfNotPresent
  # -- Secrets for pulling the migration image from a private registry
  imagePullSecrets: []
  # -- Image used by the TCP-wait initContainer
  waitImage: busybox
  # -- Postgres connection for the migration Job. Empty fields fall back to
  # matcher.configmap.POSTGRES_* (host derives from the postgresql subchart).
  postgres:
    host: ""
    port: ""
    user: ""
    database: ""
    sslMode: ""
    # -- Password for the PreSync Secret, external PostgreSQL only (empty ->
    # matcher.secrets.POSTGRES_PASSWORD). Ignored with the bundled PostgreSQL (the
    # Job reads the subchart Secret) and when matcher.useExistingSecret=true.
    password: ""
  # -- Job backoff limit
  backoffLimit: 3
  # -- Job active deadline (seconds)
  activeDeadlineSeconds: 600
  # -- TTL after the Job finishes (seconds)
  ttlSecondsAfterFinished: 600
  resources:
    requests:
      cpu: 50m
      memory: 64Mi
    limits:
      cpu: 250m
      memory: 256Mi

# Valkey (Redis-compatible) configuration
valkey:
  enabled: true

  global:
    security:
      allowInsecureImages: true

  image:
    repository: bitnamisecure/valkey
    # Pinned by DIGEST, not a tag: bitnamisecure only publishes a mutable
    # `latest`, and a bare tag would silently drift across restarts. Same
    # digest go-boilerplate-ddd validated in a live cluster.
    tag: ""
    digest: "sha256:5d43ca8bb57aa263ef78d1684dbf1e4b4f63844727eafdd5ea2b0e102a25b141"

  external: false
  architecture: standalone

  auth:
    enabled: true
    password: ""
    username: matcher

  primary:
    kind: Deployment
    resourcesPreset: "medium"

    persistence:
      enabled: false

    extraFlags:
      - "--maxmemory 640mb"
      - "--maxmemory-policy allkeys-lru"
      - "--hz 100"
      - "--maxclients 10000"

# PostgreSQL configuration
postgresql:
  enabled: true

  global:
    security:
      allowInsecureImages: true

  image:
    repository: bitnamisecure/postgresql
    # Pinned by DIGEST, not a tag: bitnamisecure only publishes a mutable
    # `latest`, and a bare tag would silently drift across restarts. Same
    # digest go-boilerplate-ddd validated in a live cluster.
    tag: ""
    digest: "sha256:db2312d9b243afa8c3b3f5496e478d17d0dff9791d06f3b93b9567abd86ae92f"

  external: false
  architecture: replication
  replication:
    numSynchronousReplicas: 1

  auth:
    enabled: true
    enablePostgresUser: true
    postgresPassword: ""
    username: "matcher"
    password: ""
    database: "matcher"
    replicationUsername: "replicator"
    replicationPassword: ""

  primary:
    persistence:
      size: 8Gi

    resourcesPreset: large

    extendedConfiguration: |
      shared_buffers = 2GB
      max_wal_senders = 20
      wal_keep_size = 512MB
      max_replication_slots = 20

    extraEnvVars:
      - name: POSTGRESQL_WAL_LEVEL
        value: "logical"
      - name: POSTGRESQL_HOST_STANDBY
        value: "on"
      - name: POSTGRESQL_MAX_CONNECTIONS
        value: "500"
      - name: POSTGRESQL_TCP_KEEPALIVES_IDLE
        value: "30"
      - name: POSTGRESQL_TCP_KEEPALIVES_INTERVAL
        value: "10"
      - name: POSTGRESQL_TCP_KEEPALIVES_COUNT
        value: "5"

  readReplicas:
    name: replication
    replicaCount: 1
    persistence:
      size: 8Gi

    resourcesPreset: large

    extendedConfiguration: |
      shared_buffers = 2GB
      max_wal_senders = 20
      max_replication_slots = 20
      wal_keep_size = 512MB

    extraEnvVars:
      - name: POSTGRESQL_WAL_LEVEL
        value: "logical"
      - name: POSTGRESQL_HOST_STANDBY
        value: "on"
      - name: POSTGRESQL_MAX_CONNECTIONS
        value: "500"
      - name: POSTGRESQL_TCP_KEEPALIVES_IDLE
        value: "40"
      - name: POSTGRESQL_TCP_KEEPALIVES_INTERVAL
        value: "10"
      - name: POSTGRESQL_TCP_KEEPALIVES_COUNT
        value: "5"

# RabbitMQ configuration
rabbitmq:
  enabled: true
  image:
    tag: "3.13.6"

  persistence:
    size: 8Gi

  resources:
    requests:
      cpu: 250m
      memory: 512Mi
    limits:
      cpu: "1"
      memory: 1Gi

  podSecurityContext:
    runAsUser: 1001
    runAsGroup: 1001
    fsGroup: 1001
    fsGroupChangePolicy: "OnRootMismatch"
    seccompProfile: { type: RuntimeDefault }

  containerSecurityContext:
    allowPrivilegeEscalation: false
    readOnlyRootFilesystem: true
    capabilities: { drop: ["ALL"] }

  authentication:
    user:
      value: "matcher"
    password:
      value: ""
    erlangCookie:
      value: ""

  extraSecrets:
    - name: "matcher-rabbitmq-load-definition"
      mountPath: /etc/rabbitmq/definitions

  customConfig: |
    management.load_definitions = /etc/rabbitmq/definitions/load_definition.json

# AWS Authentication - IAM Roles Anywhere for non-AWS clusters (e.g. Proxmox)
aws:
  rolesAnywhere:
    enabled: false
    trustAnchorArn: ""
    profileArn: ""
    roleArn: ""
    region: "us-east-2"
    sessionDuration: 3600
    certificateSecretName: "matcher-iam-tls"
    sidecar:
      image:
        repository: public.ecr.aws/rolesanywhere/credential-helper
        tag: "latest-amd64"
        pullPolicy: IfNotPresent
      port: 9911
      resources:
        limits:
          cpu: 100m
          memory: 128Mi
        requests:
          cpu: 10m
          memory: 64Mi
