fix(timesketch): fix default configs nesting configmap and bump to 0.2.0
This commit is contained in:
parent
0ce506b5c2
commit
6e234d9aae
40 changed files with 36 additions and 17 deletions
|
@ -4,7 +4,7 @@ description: |
|
|||
A toolset of DFIR tools
|
||||
appVersion: "20240508"
|
||||
type: application
|
||||
version: 0.1.3
|
||||
version: 0.2.0
|
||||
maintainers:
|
||||
- name: Tommy Skaug
|
||||
email: tommy@skaug.me
|
||||
|
|
|
@ -1,9 +1,21 @@
|
|||
{{/*
|
||||
Create a nested ConfigMap from a directory structure from the config directory.
|
||||
*/}}
|
||||
{{- define "timesketch.nestedConfigMap" -}}
|
||||
{{- $root := . -}}
|
||||
{{- $files := .Files.Glob "config/**" -}}
|
||||
{{- range $path, $file := $files -}}
|
||||
{{- $key := (regexReplaceAll "/" $path "__") -}}
|
||||
{{- printf "%s: |-\n%s" $key (indent 2 (printf "%s" $file)) | nindent 2 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "timesketch.fullname" . }}-configs
|
||||
name: {{ include "timesketch.fullname" . }}-default-config
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "timesketch.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{- (.Files.Glob "configs/**.{yaml,mappings}").AsConfig | nindent 2 }}
|
||||
{{ include "timesketch.nestedConfigMap" . | nindent 2 }}
|
||||
|
|
|
@ -62,9 +62,13 @@ spec:
|
|||
- name: upload-volume
|
||||
mountPath: /data/uploads
|
||||
subPath: uploads
|
||||
- name: timesketch-default-configs
|
||||
mountPath: /config
|
||||
readOnly: true
|
||||
{{- range $path, $file := .Files.Glob "config/**" }}
|
||||
{{ $recreatedPath := (regexReplaceAll "__" $path "/") | trimPrefix "config/" }}
|
||||
{{ $key := (regexReplaceAll "/" $path "__") }}
|
||||
- name: timesketch-default-config
|
||||
mountPath: /config/{{ $recreatedPath }}
|
||||
subPath: {{ $key }}
|
||||
{{- end }}
|
||||
- name: timesketch-conf
|
||||
mountPath: /var/timesketch.conf
|
||||
subPath: timesketch.conf
|
||||
|
@ -82,15 +86,14 @@ spec:
|
|||
- name: upload-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "timesketch.fullname" . }}-upload
|
||||
readOnly: false
|
||||
- name: timesketch-default-configs
|
||||
- name: timesketch-default-config
|
||||
configMap:
|
||||
name: {{ include "timesketch.fullname" . }}-configs
|
||||
optional: true
|
||||
name: {{ include "timesketch.fullname" . }}-default-config
|
||||
optional: false
|
||||
- name: timesketch-conf
|
||||
secret:
|
||||
secretName: {{ .Values.config.existingConfSecret }}
|
||||
optional: true
|
||||
optional: false
|
||||
- name: ca-cert
|
||||
configMap:
|
||||
name: {{ .Values.caCert.existingConfigMapName }}
|
||||
|
|
|
@ -58,9 +58,13 @@ spec:
|
|||
- name: upload-volume
|
||||
mountPath: /data/uploads
|
||||
subPath: uploads
|
||||
- name: timesketch-default-configs
|
||||
mountPath: /config
|
||||
readOnly: true
|
||||
{{- range $path, $file := .Files.Glob "config/**" }}
|
||||
{{ $recreatedPath := (regexReplaceAll "__" $path "/") | trimPrefix "config/" }}
|
||||
{{ $key := (regexReplaceAll "/" $path "__") }}
|
||||
- name: timesketch-default-config
|
||||
mountPath: /config/{{ $recreatedPath }}
|
||||
subPath: {{ $key }}
|
||||
{{- end }}
|
||||
- name: timesketch-conf
|
||||
mountPath: /var/timesketch.conf
|
||||
subPath: timesketch.conf
|
||||
|
@ -79,10 +83,10 @@ spec:
|
|||
persistentVolumeClaim:
|
||||
claimName: {{ include "timesketch.fullname" . }}-upload
|
||||
readOnly: false
|
||||
- name: timesketch-default-configs
|
||||
- name: timesketch-default-config
|
||||
configMap:
|
||||
name: {{ include "timesketch.fullname" . }}-configs
|
||||
optional: true
|
||||
name: {{ include "timesketch.fullname" . }}-default-config
|
||||
optional: false
|
||||
- name: timesketch-conf
|
||||
secret:
|
||||
secretName: {{ .Values.config.existingConfSecret }}
|
||||
|
|
Loading…
Reference in a new issue