Skip to content

Commit

Permalink
contrib: add initContainer to wipe VPC on startup
Browse files Browse the repository at this point in the history
In unexpected situations the indexer can crash and
not clean up it's layers. When using a statefulSet this
means those layers are always hanging around. This adds
an initContainer to flush the VPC before starting the
indexer pod.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy committed Nov 22, 2021
1 parent 953fa97 commit e9a0ded
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions contrib/openshift/manifests/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ objects:
mountPath: /etc/clair
- name: indexer-layer-storage
mountPath: /tmp
initContainers:
- name: init-wipe-vpc
image: ${{UBI_IMAGE}}:${{UBI_IMAGE_TAG}}
command: ['sh', '-c', "rm -rf /tmp/*"]
volumeMounts:
- name: indexer-layer-storage
mountPath: /tmp


#
# matcher deployment
Expand Down

0 comments on commit e9a0ded

Please sign in to comment.