Skip to content

Commit

Permalink
charts/turbinia Add ability to provide existing config (#151)
Browse files Browse the repository at this point in the history
* Add ability to provide existing config

* Update README.md with readme-generator-for-helm

Signed-off-by: wajihyassine <[email protected]>

* Bump Turbinia version

---------

Signed-off-by: wajihyassine <[email protected]>
Co-authored-by: wajihyassine <[email protected]>
  • Loading branch information
wajihyassine and wajihyassine authored Jun 26, 2024
1 parent da4ab0f commit 927bab1
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/turbinia/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: turbinia
version: 1.0.8
version: 1.0.9
description: A Helm chart for Turbinia Kubernetes deployments.
keywords:
- turbinia
Expand Down
1 change: 1 addition & 0 deletions charts/turbinia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ kubectl delete pvc -l release=my-release
| Name | Description | Value |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `config.override` | Overrides the default Turbinia config to instead use a user specified config. Please ensure | `turbinia.conf` |
| `config.existingConfigMap` | Use an existing ConfigMap as the default Turbinia config. | `""` |
| `config.disabledJobs` | List of Turbinia Jobs to disable. Overrides DISABLED_JOBS in the Turbinia config. | `['BinaryExtractorJob', 'BulkExtractorJob', 'HindsightJob', 'PhotorecJob', 'VolatilityJob']` |
| `config.existingVertexSecret` | Name of existing secret containing Vertex API Key in order to enable the Turbinia LLM Artifacts Analyzer. The secret must contain the key `turbinia-vertexapi` | `""` |
| `gcp.enabled` | Enables Turbinia to run within a GCP project. When enabling, please ensure you have run the supplemental script `create-gcp-sa.sh` to create a Turbinia GCP service account required for attaching persistent disks. | `false` |
Expand Down
11 changes: 11 additions & 0 deletions charts/turbinia/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,15 @@ Turbinia service port
{{- else -}}
{{ .Values.service.port }}
{{- end -}}
{{- end -}}

{{/*
Turbinia config map
*/}}
{{- define "turbinia.configmap" -}}
{{- if .Values.config.existingConfigMap -}}
{{ .Values.config.existingConfigMap }}
{{- else -}}
{{ include "turbinia.fullname" . }}-configmap
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/turbinia/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
emptyDir: {}
- name: user-configs
configMap:
name: {{ include "turbinia.fullname" . }}-configmap
name: {{ include "turbinia.configmap" . }}
optional: true
{{- with .Values.api.nodeSelector }}
nodeSelector:
Expand Down
2 changes: 1 addition & 1 deletion charts/turbinia/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ spec:
{{- if $userconfigs }}
- name: user-configs
configMap:
name: {{ include "turbinia.fullname" . }}-configmap
name: {{ include "turbinia.configmap" . }}
{{- end }}
{{- with .Values.controller.nodeSelector }}
nodeSelector:
Expand Down
2 changes: 1 addition & 1 deletion charts/turbinia/templates/init-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data:
if [ $(ls /tmp/turbinia/ | wc -l) -gt 0 ]; then
echo "Using exisiting configuration file provided."
cp /tmp/turbinia/* /etc/turbinia/
cp /tmp/turbinia/* /etc/turbinia/turbinia.conf
else
# Pull default config if one is not already provided
{{- $turbiniaWorker := "us-docker.pkg.dev/osdfir-registry/turbinia/release/turbinia-worker" -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/turbinia/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
emptyDir: {}
- name: user-configs
configMap:
name: {{ include "turbinia.fullname" . }}-configmap
name: {{ include "turbinia.configmap" . }}
optional: true
{{- with .Values.server.nodeSelector }}
nodeSelector:
Expand Down
2 changes: 1 addition & 1 deletion charts/turbinia/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ spec:
emptyDir: {}
- name: user-configs
configMap:
name: {{ include "turbinia.fullname" . }}-configmap
name: {{ include "turbinia.configmap" . }}
optional: true
{{- with .Values.worker.nodeSelector }}
nodeSelector:
Expand Down
5 changes: 5 additions & 0 deletions charts/turbinia/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ config:
## your config file
##
override: turbinia.conf
## @param config.existingConfigMap Use an existing ConfigMap as the default Turbinia config.
## Please ensure that the ConfigMap has been created prior to deployment
## (e.g. kubectl create configmap turbinia-config --from-file=turbinia.conf)
##
existingConfigMap: ""
## @param config.disabledJobs List of Turbinia Jobs to disable. Overrides DISABLED_JOBS in the Turbinia config.
##
disabledJobs: "['BinaryExtractorJob', 'BulkExtractorJob', 'HindsightJob', 'PhotorecJob', 'VolatilityJob']"
Expand Down

0 comments on commit 927bab1

Please sign in to comment.