🔨 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 - name: kubeshark-hub
command: command:
- ./hub - ./hub
{{ .Values.tap.debug | ternary "- -debug" "" }} {{- if .Values.tap.debug }}
- -debug
{{- end }}
env: env:
- name: POD_NAME - name: POD_NAME
valueFrom: valueFrom:

View File

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