Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Commit e4a378a

Browse files
author
Pengfei Qu
committed
volume access fix
1 parent 1747551 commit e4a378a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

deployment/kubernetes/yaml/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ HOSTIP=$(ip route get 8.8.8.8 | awk '/ src /{split(substr($0,index($0," src ")),
1111
. "${DIR}/../volume-info.sh"
1212
echo "NVODS=${NVODS} NLIVES=${NLIVES} SCENARIO=${SCENARIO} PLATFORM=${PLATFORM}"
1313
for template in $(find "${DIR}" -maxdepth 1 -name "*.yaml.m4" -print); do
14-
m4 -DNVODS=${NVODS} -DNLIVES=${NLIVES} -DSCENARIO=${SCENARIO} -DPLATFORM=${PLATFORM} -DHOSTIP=${HOSTIP} -DREGISTRY_PREFIX=${REGISTRY} $(env | grep _VOLUME_ | sed 's/^/-D/') -I "${DIR}" "${template}" > "${template/.m4/}"
14+
m4 -DNVODS=${NVODS} -DNLIVES=${NLIVES} -DSCENARIO=${SCENARIO} -DPLATFORM=${PLATFORM} -DUSERID=$(id -u) -DGROUPID=$(id -g) -DHOSTIP=${HOSTIP} -DREGISTRY_PREFIX=${REGISTRY} $(env | grep _VOLUME_ | sed 's/^/-D/') -I "${DIR}" "${template}" > "${template/.m4/}"
1515
done

deployment/kubernetes/yaml/vod.yaml.m4

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ ifelse(defn(`PLATFORM'),`Xeon',,`dnl
5252
name: video-archive
5353
readOnly: true
5454
defn(`PLATFORM_RESOURCES')dnl
55+
initContainers:
56+
- image: busybox:latest
57+
imagePullPolicy: IfNotPresent
58+
name: init
59+
command: ["sh", "-c", "chown -R 1000:1000 /var/www/video"]
60+
volumeMounts:
61+
- mountPath: /var/www/video
62+
name: video-cache
5563
volumes:
5664
- name: video-cache
5765
persistentVolumeClaim:

0 commit comments

Comments
 (0)