Skip to content

Commit

Permalink
Auditing for metal-api with timescaledb backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Aug 26, 2024
1 parent bd62af6 commit 689eb1d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/metal-control-plane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for deploying the metal control plane in K8s
name: metal-control-plane
version: 0.4.4
version: 0.4.5
32 changes: 24 additions & 8 deletions charts/metal-control-plane/templates/metal-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,33 @@ spec:
{{- if .Values.auditing.enabled }}
- name: METAL_API_AUDITING_ENABLED
value: "true"
- name: METAL_API_AUDITING_URL
value: "{{ .Values.auditing.url }}"
- name: METAL_API_AUDITING_API_KEY
{{- if .Values.auditing.meilisearch.existingMasterKeySecret }}
- name: METAL_API_AUDITING_MEILI_URL
value: "{{ .Values.auditing.meilisearch.url }}"
- name: METAL_API_AUDITING_MEILI_API_KEY
valueFrom:
secretKeyRef:
name: "{{ .Values.auditing.existingMasterKeySecret }}"
name: "{{ .Values.auditing.meilisearch.existingMasterKeySecret }}"
key: MEILI_MASTER_KEY
- name: METAL_API_AUDITING_INDEX_PREFIX
value: "{{ .Values.auditing.index_prefix }}"
- name: METAL_API_AUDITING_INDEX_INTERVAL
value: "{{ .Values.auditing.index_interval }}"
- name: METAL_API_AUDITING_MEILI_INDEX_PREFIX
value: "{{ .Values.auditing.meilisearch.index_prefix }}"
- name: METAL_API_AUDITING_MEILI_INDEX_INTERVAL
value: "{{ .Values.auditing.meilisearch.index_interval }}"
{{- end }}
{{- if .Values.auditing.timescaledb.host }}
- name: METAL_API_AUDITING_TIMESCALEDB_HOST
value: "{{ .Values.auditing.timescaledb.host }}"
- name: METAL_API_AUDITING_TIMESCALEDB_PORT
value: "{{ .Values.auditing.timescaledb.port }}"
- name: METAL_API_AUDITING_TIMESCALEDB_DB
value: "{{ .Values.auditing.timescaledb.db }}"
- name: METAL_API_AUDITING_TIMESCALEDB_USER
value: "{{ .Values.auditing.timescaledb.user }}"
- name: METAL_API_AUDITING_TIMESCALEDB_PASSWORD
value: "{{ .Values.auditing.timescaledb.password }}"
- name: METAL_API_AUDITING_TIMESCALEDB_RETENTION
value: "{{ .Values.auditing.timescaledb.retention }}"
{{- end }}
{{- end }}
{{- if .Values.set_resource_limits }}
resources:
Expand Down
16 changes: 12 additions & 4 deletions charts/metal-control-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,15 @@ ingress:

auditing:
enabled: false
url: ""
index_prefix: "auditing"
index_interval: "@daily"
existingMasterKeySecret: "metal-auditing-master-key"
meilisearch:
url: ""
index_prefix: "auditing"
index_interval: "@daily"
existingMasterKeySecret: "metal-auditing-master-key"
timescaledb:
host: ""
port: "5432"
db: auditing
user: postgres
password: ""
retention: "14 days"

0 comments on commit 689eb1d

Please sign in to comment.