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
|
A toolset of DFIR tools
|
||||||
appVersion: "20240508"
|
appVersion: "20240508"
|
||||||
type: application
|
type: application
|
||||||
version: 0.1.3
|
version: 0.2.0
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: Tommy Skaug
|
- name: Tommy Skaug
|
||||||
email: tommy@skaug.me
|
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
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "timesketch.fullname" . }}-configs
|
name: {{ include "timesketch.fullname" . }}-default-config
|
||||||
namespace: {{ .Release.Namespace | quote }}
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "timesketch.labels" . | nindent 4 }}
|
{{- include "timesketch.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
{{- (.Files.Glob "configs/**.{yaml,mappings}").AsConfig | nindent 2 }}
|
{{ include "timesketch.nestedConfigMap" . | nindent 2 }}
|
||||||
|
|
|
@ -62,9 +62,13 @@ spec:
|
||||||
- name: upload-volume
|
- name: upload-volume
|
||||||
mountPath: /data/uploads
|
mountPath: /data/uploads
|
||||||
subPath: uploads
|
subPath: uploads
|
||||||
- name: timesketch-default-configs
|
{{- range $path, $file := .Files.Glob "config/**" }}
|
||||||
mountPath: /config
|
{{ $recreatedPath := (regexReplaceAll "__" $path "/") | trimPrefix "config/" }}
|
||||||
readOnly: true
|
{{ $key := (regexReplaceAll "/" $path "__") }}
|
||||||
|
- name: timesketch-default-config
|
||||||
|
mountPath: /config/{{ $recreatedPath }}
|
||||||
|
subPath: {{ $key }}
|
||||||
|
{{- end }}
|
||||||
- name: timesketch-conf
|
- name: timesketch-conf
|
||||||
mountPath: /var/timesketch.conf
|
mountPath: /var/timesketch.conf
|
||||||
subPath: timesketch.conf
|
subPath: timesketch.conf
|
||||||
|
@ -82,15 +86,14 @@ spec:
|
||||||
- name: upload-volume
|
- name: upload-volume
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ include "timesketch.fullname" . }}-upload
|
claimName: {{ include "timesketch.fullname" . }}-upload
|
||||||
readOnly: false
|
- name: timesketch-default-config
|
||||||
- name: timesketch-default-configs
|
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "timesketch.fullname" . }}-configs
|
name: {{ include "timesketch.fullname" . }}-default-config
|
||||||
optional: true
|
optional: false
|
||||||
- name: timesketch-conf
|
- name: timesketch-conf
|
||||||
secret:
|
secret:
|
||||||
secretName: {{ .Values.config.existingConfSecret }}
|
secretName: {{ .Values.config.existingConfSecret }}
|
||||||
optional: true
|
optional: false
|
||||||
- name: ca-cert
|
- name: ca-cert
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ .Values.caCert.existingConfigMapName }}
|
name: {{ .Values.caCert.existingConfigMapName }}
|
||||||
|
|
|
@ -58,9 +58,13 @@ spec:
|
||||||
- name: upload-volume
|
- name: upload-volume
|
||||||
mountPath: /data/uploads
|
mountPath: /data/uploads
|
||||||
subPath: uploads
|
subPath: uploads
|
||||||
- name: timesketch-default-configs
|
{{- range $path, $file := .Files.Glob "config/**" }}
|
||||||
mountPath: /config
|
{{ $recreatedPath := (regexReplaceAll "__" $path "/") | trimPrefix "config/" }}
|
||||||
readOnly: true
|
{{ $key := (regexReplaceAll "/" $path "__") }}
|
||||||
|
- name: timesketch-default-config
|
||||||
|
mountPath: /config/{{ $recreatedPath }}
|
||||||
|
subPath: {{ $key }}
|
||||||
|
{{- end }}
|
||||||
- name: timesketch-conf
|
- name: timesketch-conf
|
||||||
mountPath: /var/timesketch.conf
|
mountPath: /var/timesketch.conf
|
||||||
subPath: timesketch.conf
|
subPath: timesketch.conf
|
||||||
|
@ -79,10 +83,10 @@ spec:
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ include "timesketch.fullname" . }}-upload
|
claimName: {{ include "timesketch.fullname" . }}-upload
|
||||||
readOnly: false
|
readOnly: false
|
||||||
- name: timesketch-default-configs
|
- name: timesketch-default-config
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "timesketch.fullname" . }}-configs
|
name: {{ include "timesketch.fullname" . }}-default-config
|
||||||
optional: true
|
optional: false
|
||||||
- name: timesketch-conf
|
- name: timesketch-conf
|
||||||
secret:
|
secret:
|
||||||
secretName: {{ .Values.config.existingConfSecret }}
|
secretName: {{ .Values.config.existingConfSecret }}
|
||||||
|
|
Loading…
Reference in a new issue