- mqtt-bridge: kafka.Writer → SQS SendMessage (AWS SDK Go v2) - kafka-consumer → sqs-consumer: polling loop с ReceiveMessage/DeleteMessage - admin stats: Kafka lag → SQS GetQueueAttributes - Удалён kafka-consumer, добавлен sqs-consumer - go.mod: убран segmentio/kafka-go, добавлен aws-sdk-go-v2 - Dockerfile, Makefile: kafka-consumer → sqs-consumer - .gitignore: исправлен чтобы не игнорировать cmd/ директории - deployments: новый iot-sqs-consumer.yaml, обновлён mqtt-bridge - doc/decisions: задокументировано решение
32 lines
718 B
Makefile
32 lines
718 B
Makefile
# Создано: 2026-04-12
|
|
# Makefile для IoT managed service.
|
|
|
|
IMG ?= naeel/iot-operator:latest
|
|
|
|
.PHONY: build build-all docker-build docker-push test tidy
|
|
|
|
# Собрать все бинарники
|
|
build-all: build-operator build-bridge build-consumer
|
|
|
|
build-operator:
|
|
CGO_ENABLED=0 go build -o bin/iot-operator ./cmd/iot-operator/
|
|
|
|
build-bridge:
|
|
CGO_ENABLED=0 go build -o bin/mqtt-bridge ./cmd/mqtt-bridge/
|
|
|
|
build-consumer:
|
|
CGO_ENABLED=0 go build -o bin/sqs-consumer ./cmd/sqs-consumer/
|
|
test:
|
|
go test ./...
|
|
|
|
tidy:
|
|
go mod tidy
|
|
|
|
# Применить CRD в кластер
|
|
install-crd:
|
|
kubectl apply -f config/crd/bases/
|
|
|
|
# Деплой всех компонентов
|
|
deploy:
|
|
kubectl apply -f deployments/k8s/
|