This repository has been archived on 2023-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
gitea.kosmos.org/script/copy_customization

12 lines
354 B
Bash
Executable File

#!/usr/bin/env bash
for podname in $(kubectl get pods -l name=gitea-server -o json \
| jq -r '.items[].metadata.name'); do
for path in ./kubernetes/custom/*; do
echo "Copying ${path}..."
kubectl cp "${path}" "${podname}":"/data/gitea/"
done
# Fix permissions
kubectl exec "${podname}" -- chown -R 1000:1000 /data/gitea/
done