templates/deployment.yaml を更新

This commit is contained in:
2025-12-12 00:14:57 +00:00
parent 4e098685ac
commit dc8cf4f6f2

View File

@@ -165,13 +165,20 @@ spec:
echo "WordPress is already installed, skipping installation"
fi
{{- if .Values.wordpress.adsTxt.enabled }}
echo "Deploying ads.txt..."
cat > /var/www/html/ads.txt <<'ADSTXT'
if [ ! -z "$TABLES" ]; then
echo "Running WordPress core update check..."
CURRENT_VERSION=$(cat /usr/src/wordpress/wp-includes/version.php | grep "wp_version = " | cut -d "'" -f 2 || echo "unknown")
echo "Target WordPress version: $CURRENT_VERSION"
/tmp/wp-cli.phar --path=/var/www/html core update-db 2>/dev/null || echo "No database update needed"
fi
if [ "${{ .Values.wordpress.adsTxt.enabled }}" = "true" ]; then
echo "Deploying ads.txt..."
cat > /var/www/html/ads.txt <<'ADSTXTEOF'
{{ .Values.wordpress.adsTxt.content }}
ADSTXT
echo "ads.txt deployed"
{{- end }}
ADSTXTEOF
echo "ads.txt deployed"
fi
echo "=== WordPress Initialization Completed ==="
volumeMounts: