modified initcontainer
This commit is contained in:
@@ -1965,10 +1965,14 @@ spec:
|
|||||||
initContainers:
|
initContainers:
|
||||||
- name: build-bookmarks-index
|
- name: build-bookmarks-index
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
command: ["/bin/sh", "-c"]
|
command: ["/bin/sh", "-c"]
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
pip install --no-cache-dir pyyaml >/dev/null
|
apk add --no-cache py3-yaml >/dev/null
|
||||||
python - <<'PY'
|
python - <<'PY'
|
||||||
import json, os, yaml
|
import json, os, yaml
|
||||||
|
|
||||||
@@ -1997,7 +2001,7 @@ spec:
|
|||||||
"group": group_title,
|
"group": group_title,
|
||||||
})
|
})
|
||||||
|
|
||||||
# de-dupe by URL (keep first)
|
# de-dupe by URL
|
||||||
seen = set()
|
seen = set()
|
||||||
out = []
|
out = []
|
||||||
for it in items:
|
for it in items:
|
||||||
@@ -2012,6 +2016,12 @@ spec:
|
|||||||
|
|
||||||
print(f"Wrote {len(out)} bookmarks -> /app/assets/bookmarks.json")
|
print(f"Wrote {len(out)} bookmarks -> /app/assets/bookmarks.json")
|
||||||
PY
|
PY
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
||||||
|
readOnly: true
|
||||||
|
- name: assets
|
||||||
|
mountPath: /app/assets
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /config
|
mountPath: /config
|
||||||
|
|||||||
Reference in New Issue
Block a user