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

Commit

Permalink
volume access fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pengfei Qu committed Mar 19, 2021
1 parent 1747551 commit e4a378a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deployment/kubernetes/yaml/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ HOSTIP=$(ip route get 8.8.8.8 | awk '/ src /{split(substr($0,index($0," src ")),
. "${DIR}/../volume-info.sh"
echo "NVODS=${NVODS} NLIVES=${NLIVES} SCENARIO=${SCENARIO} PLATFORM=${PLATFORM}"
for template in $(find "${DIR}" -maxdepth 1 -name "*.yaml.m4" -print); do
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/}"
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/}"
done
8 changes: 8 additions & 0 deletions deployment/kubernetes/yaml/vod.yaml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ ifelse(defn(`PLATFORM'),`Xeon',,`dnl
name: video-archive
readOnly: true
defn(`PLATFORM_RESOURCES')dnl
initContainers:
- image: busybox:latest
imagePullPolicy: IfNotPresent
name: init
command: ["sh", "-c", "chown -R 1000:1000 /var/www/video"]
volumeMounts:
- mountPath: /var/www/video
name: video-cache
volumes:
- name: video-cache
persistentVolumeClaim:
Expand Down

0 comments on commit e4a378a

Please sign in to comment.