diff --git a/scripts/acceptance/local-cluster.sh b/scripts/acceptance/local-cluster.sh index a28fc60..d9d037d 100755 --- a/scripts/acceptance/local-cluster.sh +++ b/scripts/acceptance/local-cluster.sh @@ -293,6 +293,22 @@ spec: template: spec: restartPolicy: Never + securityContext: + fsGroup: 10001 + fsGroupChangePolicy: OnRootMismatch + initContainers: + - name: stage-snapshot + image: $api_image + command: + - /bin/sh + - -ec + - umask 077; cp /snapshot-source/snapshot.json /snapshot/snapshot.json + volumeMounts: + - name: snapshot-source + mountPath: /snapshot-source + readOnly: true + - name: snapshot + mountPath: /snapshot containers: - name: import image: $api_image @@ -311,9 +327,11 @@ spec: mountPath: /snapshot readOnly: true volumes: - - name: snapshot + - name: snapshot-source configMap: name: easyai-acceptance-snapshot + - name: snapshot + emptyDir: {} EOF kubectl --context "$context" -n "$namespace" wait \ --for=condition=complete job/easyai-local-snapshot-import --timeout=5m >/dev/null