Skip to content

Commit

Permalink
contrib: First wipe anything that might be left before starting clair
Browse files Browse the repository at this point in the history
indexers

We have observed that the postStart command is not consistently
wiping the /tmp dir as it appears like there is a race
condition as the PVC is not guaranteed to be mounted when it is
run.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy committed Jul 28, 2022
1 parent 677a313 commit a660963
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions contrib/openshift/manifests/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ objects:
requests:
cpu: ${{INDEXER_CPU_REQS}}
memory: ${{INDEXER_MEM_REQS}}
lifecycle:
postStart:
exec:
command: ['sh', '-c', 'rm -rf /tmp/sha* /tmp/fetch.*']
command: ['clair']
command:
- sh
- '-c'
- rm -rf /tmp/sha* /tmp/fetch.* && exec clair
env:
- name: CLAIR_CONF
value: '/etc/clair/config.yaml'
Expand Down

0 comments on commit a660963

Please sign in to comment.