Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

3.4 KB
Raw Blame
{{- /*
  `ueba.enabled` had no reader. honeytokens-deployment.yaml and
  purple-team-deployment.yaml each gate on their own flag; this file did not,
  so `--set ueba.enabled=false` rendered the Deployment anyway. On a cluster
  without the UEBA image that is two pods in CreateContainerConfigError for a
  subsystem the operator switched off, and the switch reads as broken rather
  than as absent. Same shape as the AISOC_DISABLE_OPENSEARCH setting that
  nothing read: a control wired to nothing is worse than no control.
*/}}
{{- if .Values.ueba.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "aisoc.fullname" . }}-ueba
  labels:
    {{- include "aisoc.labels" . | nindent 4 }}
    app.kubernetes.io/component: ueba
spec:
  replicas: {{ .Values.ueba.replicaCount | default 2 }}
  selector:
    matchLabels:
      {{- include "aisoc.selectorLabels" . | nindent 6 }}
      app.kubernetes.io/component: ueba
  template:
    metadata:
      labels:
        {{- include "aisoc.selectorLabels" . | nindent 8 }}
        app.kubernetes.io/component: ueba
    spec:
      containers:
        - name: ueba
          image: "{{ .Values.ueba.image.repository }}:{{ .Values.ueba.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.ueba.image.pullPolicy | default "IfNotPresent" }}
          ports:
            - name: http
              containerPort: 8004
          env:
            - name: UEBA_DATABASE_URL
              valueFrom:
                secretKeyRef:
                  name: {{ include "aisoc.fullname" . }}-secrets
                  key: database-url
            - name: UEBA_KAFKA_BOOTSTRAP_SERVERS
              value: {{ include "aisoc.kafkaBootstrap" . | quote }}
            - name: UEBA_OTEL_ENDPOINT
              value: {{ .Values.otel.endpoint | default "http://otel-collector:4317" | quote }}
          livenessProbe:
            httpGet:
              path: /health
              port: http
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /health
              port: http
            initialDelaySeconds: 5
            periodSeconds: 10
          resources:
            {{- toYaml (.Values.ueba.resources | default dict) | nindent 12 }}
---
apiVersion: v1
kind: Service
metadata:
  name: {{ include "aisoc.fullname" . }}-ueba
  labels:
    {{- include "aisoc.labels" . | nindent 4 }}
    app.kubernetes.io/component: ueba
spec:
  ports:
    - port: 8004
      targetPort: http
      protocol: TCP
      name: http
  selector:
    {{- include "aisoc.selectorLabels" . | nindent 4 }}
    app.kubernetes.io/component: ueba
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: {{ include "aisoc.fullname" . }}-ueba
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: {{ include "aisoc.fullname" . }}-ueba
  minReplicas: {{ .Values.ueba.hpa.minReplicas | default 2 }}
  maxReplicas: {{ .Values.ueba.hpa.maxReplicas | default 8 }}
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: {{ .Values.ueba.hpa.targetCPU | default 60 }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: {{ include "aisoc.fullname" . }}-ueba
spec:
  minAvailable: 1
  selector:
    matchLabels:
      {{- include "aisoc.selectorLabels" . | nindent 6 }}
      app.kubernetes.io/component: ueba
{{- end }}