🔨 Use if for commands

This commit is contained in:
M. Mert Yildiran 2023-10-13 02:09:59 +03:00
parent 9cdf1aa68b
commit 9f8ecc8e4e
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461
2 changed files with 15 additions and 5 deletions

View File

@ -29,7 +29,9 @@ spec:
- name: kubeshark-hub
command:
- ./hub
{{ .Values.tap.debug | ternary "- -debug" "" }}
{{- if .Values.tap.debug }}
- -debug
{{- end }}
env:
- name: POD_NAME
valueFrom:

View File

@ -32,11 +32,17 @@ spec:
- any
- -port
- '{{ .Values.tap.proxy.worker.srvport }}'
{{ .Values.tap.servicemesh | ternary "- -servicemesh" "" }}
{{- if .Values.tap.servicemesh }}
- -servicemesh
{{- end }}
- -procfs
- /hostproc
{{ .Values.tap.debug | ternary "- -debug" "" }}
{{ .Values.tap.nokernelmodule | ternary "- -no-kernel-module" "" }}
{{- if .Values.tap.debug }}
- -debug
{{- end }}
{{- if .Values.tap.nokernelmodule }}
- -no-kernel-module
{{- end }}
image: '{{ .Values.tap.docker.registry }}/worker:{{ .Values.tap.docker.tag }}'
imagePullPolicy: {{ .Values.tap.docker.imagepullpolicy }}
name: sniffer
@ -98,7 +104,9 @@ spec:
- ./tracer
- -procfs
- /hostproc
{{ .Values.tap.debug | ternary "- -debug" "" }}
{{- if .Values.tap.debug }}
- -debug
{{- end }}
image: '{{ .Values.tap.docker.registry }}/worker:{{ .Values.tap.docker.tag }}'
imagePullPolicy: {{ .Values.tap.docker.imagepullpolicy }}
name: tracer