### Injector Sample Complete Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Placeholder for a complete injector configuration example. ```yaml injectors: ``` -------------------------------- ### Ready Checker Init Container Output Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example output of the ready checker init container configuration. ```yaml ... initContainers: - name: ready-checker-minio image: busybox command: - 'sh' - '-c' - 'RETRY=0; until [ $RETRY -eq 30 ]; do nc -zv openaev-ci-minio 9000 && break; echo "[$RETRY/30] waiting service openaev-ci-minio:9000 is ready"; sleep 5; RETRY=$(($RETRY + 1)); done' - name: ready-checker-postgresql image: busybox command: - 'sh' - '-c' - 'RETRY=0; until [ $RETRY -eq 30 ]; do nc -zv openaev-ci-postgresql 5432 && break; echo "[$RETRY/30] waiting service openaev-ci-postgresql:5432 is ready"; sleep 5; RETRY=$(($RETRY + 1)); done' - name: ready-checker-rabbitmq image: busybox command: - 'sh' - '-c' - 'RETRY=0; until [ $RETRY -eq 30 ]; do nc -zv openaev-ci-rabbitmq 5672 && break; echo "[$RETRY/30] waiting service openaev-ci-rabbitmq:5672 is ready"; sleep 5; RETRY=$(($RETRY + 1)); done' ``` -------------------------------- ### Custom Image Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example of configuring a custom image repository and tag for a collector. ```yaml collectors: - name: http-query enabled: true replicas: 1 image: repository: my-private-repo/collector-http-query tag: "1.1.0" ... ``` -------------------------------- ### Default Image Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example showing how to use the default image for a collector if the 'image' block is not specified. ```yaml collectors: - name: http-query enabled: true replicas: 1 ... ``` -------------------------------- ### Collector Sample Complete Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Complete configuration example for the Microsoft Entra collector. ```yaml collectors: # https://github.com/OpenAEV-Platform/collectors/tree/main/microsoft-entra - name: microsoft-entra enabled: true replicas: 1 image: repository: openaev/collector-microsoft-entra env: OPENBAS_URL: "XXXX" OPENBAS_TOKEN: "XXXX" COLLECTOR_ID: ChangeMe COLLECTOR_NAME: "Microsoft Entra" COLLECTOR_LOG_LEVEL: error MICROSOFT_ENTRA_TENANT_ID: "XXXX" MICROSOFT_ENTRA_CLIENT_ID: "XXXX" INCLUDE_EXTERNAL: "false" envFromSecrets: MICROSOFT_ENTRA_CLIENT_SECRET: name: my-secret-credentials key: MICROSOFT_ENTRA_CLIENT_SECRET resources: requests: memory: 128Mi cpu: 100m limits: memory: 128Mi ``` -------------------------------- ### Collector Affinity Example Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example of using pod anti-affinity to distribute collector replicas across nodes. ```yaml - name: microsoft-entra ... affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: openaev.collector operator: In values: - microsoft-entra topologyKey: kubernetes.io/hostname ``` -------------------------------- ### Enable Ready Checker Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Configuration to enable readiness checks for dependent services. ```yaml readyChecker: enabled: true # -- Number of retries before giving up retries: 30 # -- Timeout for each check timeout: 5 # -- List services services: - name: minio port: 9000 - name: postgresql port: 5432 - name: rabbitmq port: 5672 ``` -------------------------------- ### Enable Test Connection Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Configuration to enable service reachability checks. ```yaml testConnection: true ``` -------------------------------- ### Custom Service Account Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example of creating a custom service account named 'test' for a collector. ```yaml ... collectors: - name: http-query enabled: true replicas: 1 serviceAccount: create: true name: test automountServiceAccountToken: true # false by default ``` -------------------------------- ### Node Selector and Tolerations Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Configuration example demonstrating how to use nodeSelector and tolerations to control where the injector pod runs. ```yaml injector: - name: http-query ... nodeSelector: project: "openaev" tolerations: - key: "project" operator: "Equal" value: "openaev" effect: "NoSchedule" ``` -------------------------------- ### HTTP Query Injector Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example configuration for the http-query injector, including image repository, environment variables, secrets, and resource requests/limits. ```yaml name: http-query enabled: true replicas: 1 image: repository: openaev/injector-http-query env: OPENBAS_URL: "XXXX" OPENBAS_TOKEN: "XXXX" INJECTOR_ID: ChangeMe INJECTOR_NAME: "HTTP query" INJECTOR_LOG_LEVEL: error envFromSecrets: MICROSOFT_ENTRA_CLIENT_SECRET: name: my-secret-credentials key: MICROSOFT_ENTRA_CLIENT_SECRET resources: requests: memory: 128Mi cpu: 100m limits: memory: 128Mi ``` -------------------------------- ### Secret Definition Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example of a Kubernetes Secret definition for storing credentials. ```yaml kind: Secret type: Opaque metadata: name: openaev-ci-credentials labels: ... data: my_secret: dGVzdA== ``` -------------------------------- ### Default Service Account Name Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example of using the default service account name by setting 'create: true' only. ```yaml ... collectors: - name: http-query enabled: true replicas: 1 serviceAccount: create: true ``` -------------------------------- ### Ready Checker Init Container Template Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Template for the init container that performs readiness checks. ```yaml initContainers: {{- range $service := .Values.readyChecker.services }} - name: ready-checker-{{ $service.name }} image: busybox command: - 'sh' - '-c' - 'RETRY=0; until [ $RETRY -eq {{ $.Values.readyChecker.retries }} ]; do nc -zv {{ $.Values.fullnameOverride | default $.Release.Name }}-{{ $service.name }} {{ $service.port }} && break; echo "[$RETRY/{{ $.Values.readyChecker.retries }}] waiting service {{ $.Values.fullnameOverride | default $.Release.Name }}-{{ $service.name }}:{{ $service.port }} is ready"; sleep {{ $.Values.readyChecker.timeout }}; RETRY=$(($RETRY + 1)); done' {{- end }} ``` -------------------------------- ### Pod Affinity Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Example of using podAntiAffinity to ensure injectors are distributed across different nodes when replicas are increased. ```yaml - name: http-query ... affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: openaev.injector operator: In values: - http-query topologyKey: kubernetes.io/hostname ``` -------------------------------- ### Automated Testing Example CI Command Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Example command for CI/CD pipelines using Chart Testing. ```bash ct lint-and-install --config ct.yaml ``` -------------------------------- ### Local Installation Testing Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Install the Helm chart in a test namespace for local testing. ```bash kubectl create namespace openaev-test helm install openaev-test charts/openaev --namespace openaev-test ``` -------------------------------- ### Install Helm chart (Chart Repository) Source: https://github.com/devops-ia/helm-openaev/blob/main/README.md Installs the OpenAEV Helm chart from a chart repository, creating the release and associated Kubernetes components. ```console helm install [RELEASE_NAME] openaev/openaev ``` -------------------------------- ### Collector Node Selector and Tolerations Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Configuration for specifying node selection and tolerations for collectors. ```yaml collector: - name: microsoft-entra ... nodeSelector: project: "openaev" tolerations: - key: "project" operator: "Equal" value: "openaev" effect: "NoSchedule" ``` -------------------------------- ### Service Account and Deployment Manifests (Default) Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Generated Kubernetes manifests for a default service account and its corresponding deployment. ```yaml # Source: openaev/templates/collector/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: sample-http-query-openaev labels: openaev.collector: splunk ... automountServiceAccountToken: true -- # Source: openaev/templates/collector/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: sample-http-query-openaev ... spec: ... template: ... spec: serviceAccountName: sample-http-query-openaev ``` -------------------------------- ### Install Helm chart (OCI Registry) Source: https://github.com/devops-ia/helm-openaev/blob/main/README.md Installs the OpenAEV Helm chart from an OCI registry, specifying the release name, chart path, and version. ```console helm install [RELEASE_NAME] oci://ghcr.io/devops-ia/helm-openaev/openaev --version=[version] ``` -------------------------------- ### Service Account and Deployment Manifests (Custom) Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/examples.md Generated Kubernetes manifests for a custom service account and its corresponding deployment. ```yaml # Source: openaev/templates/collector/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: test labels: openaev.collector: http-query ... automountServiceAccountToken: true -- # Source: openaev/templates/collector/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: sample-http-query-openaev ... spec: ... template: ... spec: serviceAccountName: test ``` -------------------------------- ### MinIO Server Block Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example YAML for configuring the MinIO server block. ```yaml env: ... MINIO_ENDPOINT: -minio:9000 ``` -------------------------------- ### MinIO envFromSecrets Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example of configuring envFromSecrets for the MinIO server block. ```yaml envFromSecrets: MINIO__ACCESS_KEY: name: -credentials key: root-user MINIO__SECRET_KEY: name: -credentials key: root-password ``` -------------------------------- ### RabbitMQ envFromSecrets Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example of configuring envFromSecrets for the RabbitMQ server block. ```yaml envFromSecrets: RABBITMQ__PASSWORD: name: -credentials key: rabbitmq-password RABBITMQ__ERLANGCOOKIE: name: -credentials key: rabbitmq-erlang-cookie ``` -------------------------------- ### MinIO Auth with Existing Secret Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example of configuring MinIO auth to use an existing secret. ```yaml minio.auth.existingSecret: -credentials ``` -------------------------------- ### OpenAEV Server Basic Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example YAML configuration for the OpenAEV server, including environment variables and ingress settings. ```yaml env: OPENBAS_ADMIN_EMAIL: admin@openaev.io OPENBAS_ADMIN_PASSWORD: test OPENBAS_ADMIN_TOKEN: b1976749-8a53-4f49-bf04-cafa2a3458c1 OPENBAS_COOKIE-SECURE: "true" INJECTOR_CALDERA_URL: http://openaev-ci-caldera:8888 INJECTOR_CALDERA_PUBLIC_URL: http://openaev-ci-caldera:8888 INJECTOR_CALDERA_API_KEY: 238cab90-5a9e-4c6f-8c7c-4ae07a50513f ... ``` ```yaml ingress: enabled: true hosts: - host: demo.mydomain.com paths: - path: / pathType: Prefix ``` -------------------------------- ### Access via NodePort Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/templates/NOTES.txt Commands to get the NodePort and Node IP for accessing the service. ```bash export NODE_PORT=$(kubectl get --namespace {{ $namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ $fullname }}-server) export NODE_IP=$(kubectl get nodes --namespace {{ $namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo "URL: http://$NODE_IP:$NODE_PORT" ``` -------------------------------- ### MinIO Auth Credentials in Secrets Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example of moving MinIO auth credentials to the secrets block. ```yaml secrets: root-user: MySecretPassword root-password: MySecretErlangCookie ``` -------------------------------- ### Access via LoadBalancer Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/templates/NOTES.txt Command to get the external IP of a LoadBalancer service. ```bash kubectl get svc --namespace {{ $namespace }} {{ $fullname }}-server -o jsonpath="{.status.loadBalancer.ingress[0].ip}" ``` -------------------------------- ### RabbitMQ Server Block Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example YAML for configuring the RabbitMQ server block, including hostname, ports, user, and password. ```yaml env: ... OPENBAS_RABBITMQ_HOSTNAME: -rabbitmq OPENBAS_RABBITMQ_MANAGEMENT-PORT: 15672 OPENBAS_RABBITMQ_PORT: 5672 OPENBAS_RABBITMQ_USER: user OPENBAS_RABBITMQ_PASS: ChangeMe ``` -------------------------------- ### OpenAEV Caldera Basic Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example YAML configuration for the OpenAEV caldera service, including environment variables and API key settings. ```yaml env: CALDERA_URL: "http://localhost:8080" config: users: red: red: ChangeMe api_key_red: ChangeMe api_key: 238cab90-5a9e-4c6f-8c7c-4ae07a50513f crypt_salt: ChangeMe encryption_key: ChangeMe app.contact.http: http://openaev-ci-caldera:8888 app.contact.tcp: 0.0.0.0:7010 app.contact.udp: 0.0.0.0:7011 app.contact.websocket: 0.0.0.0:7012 app.contact.dns.domain: localhost app.contact.dns.socket: 0.0.0.0:53 app.contact.tunnel.ssh.socket: 0.0.0.0:8022 app.contact.tunnel.ssh.user_name: sandcat app.contact.tunnel.ssh.user_password: ChangeMe objects.planners.default: atomic ... ``` -------------------------------- ### PostgreSQL Server Block Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example YAML for configuring the PostgreSQL server block, including datasource URL, username, and password. ```yaml env: SPRING_DATASOURCE_URL: jdbc:postgresql://-postgresql:5432/openaev SPRING_DATASOURCE_USERNAME: user SPRING_DATASOURCE_PASSWORD: ChangeMe ... ``` -------------------------------- ### RabbitMQ Auth with Existing Secret Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example of configuring RabbitMQ auth to use an existing secret for password and Erlang cookie. ```yaml rabbitmq.auth.existingPasswordSecret: -credentials rabbitmq.auth.existingErlangSecret: -credentials ``` -------------------------------- ### RabbitMQ Auth Credentials in Secrets Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Example of moving RabbitMQ auth password and Erlang cookie to the secrets block. ```yaml secrets: rabbitmq-password: MySecretPassword rabbitmq-erlang-cookie: MySecretErlangCookie ``` -------------------------------- ### Show all configurable options Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Command to display all configurable options for the OpenAEV chart, including comments. ```console helm show values openaev/openaev ``` -------------------------------- ### Access via ClusterIP Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/templates/NOTES.txt Commands to set up port-forwarding for a ClusterIP service. ```bash export POD_NAME=$(kubectl get pods --namespace {{ $namespace }} -l "app.kubernetes.io/name={{ include "openaev.name" . }},openaev.component=server" -o jsonpath="{.items[0].metadata.name}") kubectl --namespace {{ $namespace }} port-forward $POD_NAME {{ .Values.service.targetPort | default .Values.service.port }}:{{ .Values.service.targetPort | default .Values.service.port }} Access at: http://127.0.0.1:{{ .Values.service.targetPort | default .Values.service.port }} ``` -------------------------------- ### MinIO Basic Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Basic YAML configuration for MinIO, including enabled status, mode, auth, and persistence. ```yaml minio: enabled: true mode: standalone auth: rootUser: ChangeMe rootPassword: ChangeMe persistence: enabled: false ``` -------------------------------- ### PostgreSQL Basic Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Basic YAML configuration for PostgreSQL, including enabled status, replica count, auth, and persistence. ```yaml postgresql: enabled: true replicaCount: 1 auth: username: user password: ChangeMe persistence: enabled: false ``` -------------------------------- ### RabbitMQ Basic Configuration Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/docs/configuration.md Basic YAML configuration for RabbitMQ, including enabled status, replica count, clustering, auth, and persistence. ```yaml rabbitmq: enabled: true replicaCount: 1 clustering: enabled: false auth: username: user password: ChangeMe erlangCookie: ChangeMe persistence: enabled: false ``` -------------------------------- ### Verification: Platform Accessibility Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Port-forward the service to check platform accessibility. ```bash kubectl port-forward svc/openaev-test 8080:8080 -n openaev-test ``` -------------------------------- ### Add repository Source: https://github.com/devops-ia/helm-openaev/blob/main/README.md Adds the OpenAEV Helm chart repository and updates the local repository cache. ```console helm repo add openaev https://devops-ia.github.io/helm-openaev helm repo update ``` -------------------------------- ### Lint Testing Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Run helm lint to check for any syntax issues in the chart. ```bash helm lint charts/openaev ``` -------------------------------- ### Template Testing Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Generate and verify the template output of the Helm chart. ```bash helm template openaev charts/openaev --debug ``` -------------------------------- ### Upgrade Testing Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Test the upgrade process from a previous version of the Helm chart. ```bash helm upgrade openaev-test charts/openaev --namespace openaev-test ``` -------------------------------- ### Verification: Check Pods Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Check if all pods are running in the test namespace. ```bash kubectl get pods -n openaev-test ``` -------------------------------- ### Verification: Verify Services Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Verify if services are exposed in the test namespace. ```bash kubectl get svc -n openaev-test ``` -------------------------------- ### Clean-up: Remove Test Deployment Source: https://github.com/devops-ia/helm-openaev/blob/main/TESTING.md Remove the test deployment and namespace. ```bash helm uninstall openaev-test --namespace openaev-test kubectl delete namespace openaev-test ``` -------------------------------- ### Uninstall Helm chart Source: https://github.com/devops-ia/helm-openaev/blob/main/charts/openaev/README.md Uninstalls the OpenAEV Helm chart and removes associated Kubernetes components. ```console helm uninstall [RELEASE_NAME] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.