we are defining a initContainer for our helm chart. relevant part is the following
initContainers:
- name: "set-volumes-init"
image: "IMAGE AND TAG"
command: ['sh', '-c', 'COMMAND 1 && COMMAND 2 && COMMAND 3']
volumeMounts:
- name: volume-summary
mountPath: /usr/summ
the question is: how do i make the "command" like have the different commands according to if a value is defined or not?
e.g: if i have the value: podx.val2 defined, i want the COMMAND 2 to be included, but if its not, then i dont want it.
same for other COMMANDS