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=refs%2Fchanges%2F33%2F9733%2F1;hp=790ee8707ca88fb5918bc06ae95da48a10953eb4;hpb=45b7cbb815ec83ff50b3881ed5eb3799ee294925;p=nonrtric.git diff --git a/test/simulator-group/pvc-cleaner/pvc-cleaner.yaml b/test/simulator-group/pvc-cleaner/pvc-cleaner.yaml index 790ee870..150d4047 100644 --- a/test/simulator-group/pvc-cleaner/pvc-cleaner.yaml +++ b/test/simulator-group/pvc-cleaner/pvc-cleaner.yaml @@ -1,19 +1,41 @@ +# ============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: name: pvc-cleaner namespace: $PVC_CLEANER_NAMESPACE + labels: + run: $PVC_CLEANER_APP_NAME + autotest: PVCCLEANER spec: restartPolicy: Never containers: - name: pvc-cleaner - image: "ubuntu:20.10" + 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