Files
zeekay ced03c4a50 refactor: rename all KRAKEND references to GATEWAY
Complete rebrand of the fork from KrakenD naming to Hanzo Gateway:

- Go package: `package krakend` → `package gateway` (9 source files)
- Directory: cmd/krakend-ce → cmd/gateway, cmd/krakend-integration → cmd/gateway-integration
- Config files: krakend.json → gateway.json (configs, test fixtures)
- Dockerfile: user, paths, binary all renamed to gateway
- K8s manifests: deployment/service/ingress names, labels, env vars
  (KRAKEND_PORT → GATEWAY_PORT), configmap names, mount paths
- Added enableServiceLinks: false to prevent K8s service link injection
- Makefile: all build/deploy targets updated
- GitHub Actions: configmap and deployment references updated
- Builder/systemd: init scripts, service files, logrotate renamed
- Log prefix: [KRAKEND] → [GATEWAY]
- Test flags: krakend_* → gateway_*
- README and SECURITY.md updated

Upstream references preserved (not renamed):
- github.com/krakend/* import paths (external dependencies)
- core.KrakendVersion, KrakendHeaderName, KrakendHeaderValue (upstream API)
- X-Krakend-* HTTP headers (set by upstream Lura framework)
- devopsfaith/krakend config alias keys (upstream compatibility)
- krakendbf variable (upstream bloomfilter package alias)
2026-02-10 04:05:41 -08:00

56 lines
1.1 KiB
Bash

#!/bin/bash
### BEGIN INIT INFO
# Provides: gateway
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Init for Hanzo Gateway
# Description: Init and control system for Hanzo Gateway
### END INIT INFO
set -ue
NAME="gateway"
DESC="gateway"
. /lib/lsb/init-functions
PID=/var/run/gateway.pid
start() {
start-stop-daemon --start --background --quiet \
--pidfile "$PID" --make-pidfile \
--exec /usr/bin/gateway run -c /etc/gateway/gateway.json
}
stop() {
start-stop-daemon --stop --quiet --pidfile "$PID"
}
case "${1-}" in
start)
echo -n "Starting $DESC: "
start
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
stop
echo "$NAME."
;;
restart)
echo -n "Restarting $DESC: "
stop
sleep 1
start
echo "$NAME."
;;
status)
status_of_proc -p "$PID" "$NAME" "$NAME"
;;
*)
echo "Usage: $0 {start|stop|restart|status}" >&2
exit 1
;;
esac