prole/tmp/jemalloc_daemonset.yaml
chrisfu b4fc5641db checkpoint: sanitize prole config for host portability
- fix conf/prod/prole.cfg by replacing hardcoded /Users/chrisfu paths with /Users/chrisfu

- remove injected [update.sh] log lines and stray password artifacts so config is executable

- include latest pending updates across deployment config, UI/core flow, vault/network artifacts, and helper scripts
2026-04-10 05:58:40 -07:00

62 lines
1.8 KiB
YAML

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: jemalloc-builder
namespace: gitlab
labels:
app: jemalloc-builder
spec:
selector:
matchLabels:
app: jemalloc-builder
template:
metadata:
labels:
app: jemalloc-builder
spec:
tolerations:
- operator: Exists
initContainers:
- name: build
image: alpine:latest
command:
- sh
- -c
- |
set -e
TARGET=/hostlib/libjemalloc.so.2
if [ -f "$TARGET" ]; then
echo "Already built at $TARGET — skipping."
exit 0
fi
echo "Installing build tools..."
apk add --no-cache gcc musl-dev make wget autoconf 2>&1
cd /tmp
echo "Downloading jemalloc 5.3.0..."
wget -q -O jemalloc.tar.bz2 \
https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2
tar xf jemalloc.tar.bz2
cd jemalloc-5.3.0
echo "Configuring with --with-lg-page=14 (16KB page support)..."
./configure --with-lg-page=14 --disable-stats --disable-prof --disable-fill 2>&1
echo "Building..."
make -j2 lib/libjemalloc.so.2 2>&1
cp lib/libjemalloc.so.2 "$TARGET"
chmod 755 "$TARGET"
echo "Done: $(ls -lh $TARGET)"
volumeMounts:
- name: hostlib
mountPath: /hostlib
containers:
- name: keepalive
image: alpine:latest
command: [sh, -c, "echo 'jemalloc ready at /opt/gitlab-jemalloc/libjemalloc.so.2'; sleep infinity"]
volumeMounts:
- name: hostlib
mountPath: /hostlib
volumes:
- name: hostlib
hostPath:
path: /opt/gitlab-jemalloc
type: DirectoryOrCreate