homelab/services/ha-sync/Makefile
Dan V 26db771279 ha-sync: add internal/kube package with CronJob/Lease management
- internal/kube/client.go: NewClient() with in-cluster + kubeconfig fallback
- internal/kube/cronjob.go: JobSpec, ApplyCronJob, DeleteCronJob, TriggerJob,
  GetLockStatus, SuspendCronJob, ListCronJobs, ImportFromCronJob
- Makefile/Dockerfile: add ha-sync-ctl build target
- rbac.yaml: add batch/cronjobs+jobs permissions and watch verb on leases

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-08 23:38:32 +02:00

25 lines
601 B
Makefile

BIN_DIR = bin
.PHONY: build build-sync build-ui build-ctl docker-build load clean
build: build-sync build-ui build-ctl
build-sync:
go build -o $(BIN_DIR)/ha-sync ./cmd/ha-sync
build-ui:
go build -o $(BIN_DIR)/ha-sync-ui ./cmd/ha-sync-ui
build-ctl:
go build -o $(BIN_DIR)/ha-sync-ctl ./cmd/ha-sync-ctl
docker-build:
docker build -t ha-sync:latest -f Dockerfile --target ha-sync .
docker build -t ha-sync-ui:latest -f Dockerfile --target ha-sync-ui .
docker build -t ha-sync-ctl:latest -f Dockerfile --target ha-sync-ctl .
load: docker-build
./build-and-load.sh
clean:
rm -rf $(BIN_DIR)