fix(build): move backupstrategy-controller image build to backup-controller
The backupstrategy-controller directory was removed but image build was still referenced separately in root Makefile. Now both images are built from backup-controller package. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
parent
205d68c6b5
commit
fd08fdaa08
4 changed files with 36 additions and 4 deletions
1
Makefile
1
Makefile
|
|
@ -18,7 +18,6 @@ build: build-deps
|
|||
make -C packages/system/cozystack-api image
|
||||
make -C packages/system/cozystack-controller image
|
||||
make -C packages/system/backup-controller image
|
||||
make -C packages/system/backupstrategy-controller image
|
||||
make -C packages/system/lineage-controller-webhook image
|
||||
make -C packages/system/cilium image
|
||||
make -C packages/system/linstor image
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ OPERATOR_CRDDIR=packages/core/installer/definitions
|
|||
COZY_CONTROLLER_CRDDIR=packages/system/cozystack-controller/definitions
|
||||
COZY_RD_CRDDIR=packages/system/application-definition-crd/definition
|
||||
BACKUPS_CORE_CRDDIR=packages/system/backup-controller/definitions
|
||||
BACKUPSTRATEGY_CRDDIR=packages/system/backupstrategy-controller/definitions
|
||||
|
||||
trap 'rm -rf ${TMPDIR}' EXIT
|
||||
|
||||
|
|
@ -70,6 +69,6 @@ mv ${TMPDIR}/cozystack.io_applicationdefinitions.yaml \
|
|||
${COZY_RD_CRDDIR}/cozystack.io_applicationdefinitions.yaml
|
||||
|
||||
mv ${TMPDIR}/backups.cozystack.io*.yaml ${BACKUPS_CORE_CRDDIR}/
|
||||
mv ${TMPDIR}/strategy.backups.cozystack.io*.yaml ${BACKUPSTRATEGY_CRDDIR}/
|
||||
mv ${TMPDIR}/strategy.backups.cozystack.io*.yaml ${BACKUPS_CORE_CRDDIR}/
|
||||
|
||||
mv ${TMPDIR}/*.yaml ${COZY_CONTROLLER_CRDDIR}/
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ NAMESPACE=cozy-backup-controller
|
|||
include ../../../hack/common-envs.mk
|
||||
include ../../../hack/package.mk
|
||||
|
||||
image: image-backup-controller
|
||||
image: image-backup-controller image-backupstrategy-controller
|
||||
|
||||
image-backup-controller:
|
||||
docker buildx build -f images/backup-controller/Dockerfile ../../.. \
|
||||
|
|
@ -16,3 +16,14 @@ image-backup-controller:
|
|||
IMAGE="$(REGISTRY)/backup-controller:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/backup-controller.json -o json -r)" \
|
||||
yq -i '.backupController.image = strenv(IMAGE)' values.yaml
|
||||
rm -f images/backup-controller.json
|
||||
|
||||
image-backupstrategy-controller:
|
||||
docker buildx build -f images/backupstrategy-controller/Dockerfile ../../.. \
|
||||
--tag $(REGISTRY)/backupstrategy-controller:$(call settag,$(TAG)) \
|
||||
--cache-from type=registry,ref=$(REGISTRY)/backupstrategy-controller:latest \
|
||||
--cache-to type=inline \
|
||||
--metadata-file images/backupstrategy-controller.json \
|
||||
$(BUILDX_ARGS)
|
||||
IMAGE="$(REGISTRY)/backupstrategy-controller:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/backupstrategy-controller.json -o json -r)" \
|
||||
yq -i '.backupStrategyController.image = strenv(IMAGE)' values.yaml
|
||||
rm -f images/backupstrategy-controller.json
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go mod download
|
||||
|
||||
COPY api api/
|
||||
COPY pkg pkg/
|
||||
COPY cmd cmd/
|
||||
COPY internal internal/
|
||||
|
||||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -ldflags="-extldflags=-static" -o /backupstrategy-controller cmd/backupstrategy-controller/main.go
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /backupstrategy-controller /backupstrategy-controller
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
ENTRYPOINT ["/backupstrategy-controller"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue