Compare commits

...

1 Commits

Author SHA1 Message Date
Kilian Boute
4ed325fdab feat(hub): configure durable audit intake 2026-09-14 11:51:47 +00:00
6 changed files with 38 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.138.0
version: 0.139.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to

View File

@@ -310,11 +310,16 @@ Below all configuration options and parameters are listed.
| `kerberoshub.audit.enabled` | Deploy the Hub audit service. Its first responsibility is forwarding canonical MongoDB `audit_events` to configured destinations. | `false` |
| `kerberoshub.audit.repository` | Hub audit service container image repository. | `"ghcr.io/uug-ai/hub-audit"` |
| `kerberoshub.audit.pullPolicy` | Hub audit service image pull policy. | `"IfNotPresent"` |
| `kerberoshub.audit.tag` | Hub audit service image tag. | `"v1.0.0"` |
| `kerberoshub.audit.tag` | Hub audit service image tag. | `"v1.1.0"` |
| `kerberoshub.audit.replicas` | Number of audit service replicas. Per-destination MongoDB leases prevent concurrent delivery. | `1` |
| `kerberoshub.audit.dispatchInterval` | How often the mounted destination configuration is reloaded and eligible destinations are polled. | `"5s"` |
| `kerberoshub.audit.leaseDuration` | Per-destination lease duration. It must exceed every destination timeout by at least 30 seconds. | `"2m"` |
| `kerberoshub.audit.terminationGracePeriodSeconds` | Pod termination grace period. Keep this longer than `leaseDuration` so an in-flight cycle can finish. | `150` |
| `kerberoshub.audit.intake.queue` | Durable RabbitMQ queue receiving normalized audit events from producers. | `"hub-audit-events"` |
| `kerberoshub.audit.intake.deadletterQueue` | RabbitMQ queue for invalid audit events and exhausted persistence retries. | `"hub-audit-dead-letter"` |
| `kerberoshub.audit.intake.maxRetries` | Maximum MongoDB persistence retries before an intake event is dead-lettered. | `10` |
| `kerberoshub.audit.intake.prefetchCount` | Maximum unacknowledged intake events per audit replica. | `20` |
| `kerberoshub.audit.intake.persistTimeout` | Timeout for one MongoDB persistence attempt. | `"10s"` |
| `kerberoshub.audit.destinations` | Webhook destinations. Each entry supports `id`, `enabled`, `url`, delivery limits, filters, public `headers`, `bearerTokenSecret`, and arbitrary `secretHeaders`. Destination IDs retain independent checkpoints. | `[]` |
| `kerberoshub.audit.serviceMonitor.enabled` | Create a Prometheus `ServiceMonitor` for audit service metrics. | `true` |
| `kerberoshub.audit.serviceMonitor.interval` | Audit service metrics scrape interval. | `"15s"` |

View File

@@ -1,4 +1,4 @@
{{- if and (or (eq .Values.mode "all") (eq .Values.mode "ui")) .Values.kerberoshub.audit.enabled -}}
{{- if .Values.kerberoshub.audit.enabled -}}
{{- $destinations := list -}}
{{- $destinationIDs := dict -}}
{{- range $index, $destination := .Values.kerberoshub.audit.destinations -}}

View File

@@ -1,4 +1,4 @@
{{- if and (or (eq .Values.mode "all") (eq .Values.mode "ui")) .Values.kerberoshub.audit.enabled .Values.kerberoshub.audit.serviceMonitor.enabled -}}
{{- if and .Values.kerberoshub.audit.enabled .Values.kerberoshub.audit.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:

View File

@@ -1,4 +1,7 @@
{{- if and (or (eq .Values.mode "all") (eq .Values.mode "ui")) .Values.kerberoshub.audit.enabled -}}
{{- if .Values.kerberoshub.audit.enabled -}}
{{- if ne (upper .Values.queueProvider) "RABBITMQ" -}}
{{- fail "kerberoshub.audit currently requires queueProvider=RABBITMQ" -}}
{{- end -}}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -111,6 +114,24 @@ spec:
- configMapRef:
name: mongodb-config
env:
- name: RABBITMQ_HOST
value: {{ .Values.rabbitmq.host | quote }}
- name: RABBITMQ_EXCHANGE
value: {{ .Values.rabbitmq.exchange | quote }}
- name: RABBITMQ_USERNAME
value: {{ .Values.rabbitmq.username | quote }}
- name: RABBITMQ_PASSWORD
value: {{ .Values.rabbitmq.password | quote }}
- name: AUDIT_QUEUE
value: {{ .Values.kerberoshub.audit.intake.queue | quote }}
- name: AUDIT_DEADLETTER_QUEUE
value: {{ .Values.kerberoshub.audit.intake.deadletterQueue | quote }}
- name: AUDIT_MAX_RETRIES
value: {{ .Values.kerberoshub.audit.intake.maxRetries | quote }}
- name: AUDIT_PREFETCH_COUNT
value: {{ .Values.kerberoshub.audit.intake.prefetchCount | quote }}
- name: AUDIT_PERSIST_TIMEOUT
value: {{ .Values.kerberoshub.audit.intake.persistTimeout | quote }}
- name: DISPATCH_INTERVAL
value: {{ .Values.kerberoshub.audit.dispatchInterval | quote }}
- name: LEASE_DURATION

View File

@@ -705,11 +705,17 @@ kerberoshub:
enabled: false
repository: ghcr.io/uug-ai/hub-audit
pullPolicy: IfNotPresent
tag: "v1.0.0"
tag: "v1.1.0"
replicas: 1
dispatchInterval: "5s"
leaseDuration: "2m"
terminationGracePeriodSeconds: 150 # Keep above leaseDuration so an in-flight cycle can finish.
intake:
queue: "hub-audit-events"
deadletterQueue: "hub-audit-dead-letter"
maxRetries: 10
prefetchCount: 20
persistTimeout: "10s"
topologySpreadConstraints: []
volumes: []
volumeMounts: []