X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fsimulator-group%2Fpvc-cleaner%2Fpvc-cleaner.yaml;h=150d4047f635c806ef268578cc1105a95a96d9e9;hb=f8ea24d7c86ce648f4955ebc0ecdaa4cff1619ef;hp=35cf6ea7926dbc1eb26fd6e11e54a6da38f99453;hpb=d0c7f9207203ce9a502fc15c09f9938eebfd44f7;p=nonrtric.git diff --git a/test/simulator-group/pvc-cleaner/pvc-cleaner.yaml b/test/simulator-group/pvc-cleaner/pvc-cleaner.yaml index 35cf6ea7..150d4047 100644 --- a/test/simulator-group/pvc-cleaner/pvc-cleaner.yaml +++ b/test/simulator-group/pvc-cleaner/pvc-cleaner.yaml @@ -1,3 +1,20 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020-2022 Nordix Foundation +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= apiVersion: v1 kind: Pod metadata: @@ -11,12 +28,14 @@ spec: containers: - name: pvc-cleaner image: $PVC_CLEANER_IMAGE + securityContext: + runAsUser: 0 command: ["/bin/sh","-c"] - args: ["rm -rf $PVC_CLEANER_RM_PATH/*"] + args: ["rm -rf $PVC_CLEANER_RM_PATH/* ; if [ $? -ne 0 ]; then echo 'Delete failure: '$PVC_CLEANER_RM_PATH; else echo 'Delete OK: '$PVC_CLEANER_RM_PATH; fi"] volumeMounts: - mountPath: $PVC_CLEANER_RM_PATH name: pvc-cleaner-m-vol volumes: - name: pvc-cleaner-m-vol persistentVolumeClaim: - claimName: $PVC_CLEANER_CLAIMNAME \ No newline at end of file + claimName: $PVC_CLEANER_CLAIMNAME