Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
file: build/Dockerfile
file: containers/galactic/Dockerfile
push: false
tags: ghcr.io/datum-cloud/galactic:${{ github.sha }}
cache-from: type=gha
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
file: build/Dockerfile
file: containers/galactic/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
7 changes: 0 additions & 7 deletions CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ for _, tt := range tests {

---

## Kubernetes manifests

- `config/` contains deployment manifests for the agent DaemonSet and CNI plugin. `config/default/` is the base overlay for production deployment.
- Edit manifest files directly; there is no code-generation step for manifests in this repo.

---

## Commit messages

Use imperative mood, sentence case, present tense. First line ≤ 72 characters. Reference issues where applicable.
Expand Down
22 changes: 4 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ run-agent: fmt vet ## Run agent from your host.
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
.PHONY: docker-build
docker-build: ## Build docker image with the unified binary.
$(CONTAINER_TOOL) build -t ${IMG} -f build/Dockerfile .
$(CONTAINER_TOOL) build -t ${IMG} -f containers/galactic/Dockerfile .

.PHONY: docker-push
docker-push: ## Push docker image with the unified binary.
Expand All @@ -117,26 +117,12 @@ PLATFORMS ?= linux/amd64,linux/arm64
.PHONY: docker-buildx
docker-buildx: ## Build and push docker image for the unified binary for cross-platform support
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' build/Dockerfile > build/Dockerfile.cross
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' containers/galactic/Dockerfile > containers/galactic/Dockerfile.cross
- $(CONTAINER_TOOL) buildx create --name galactic-builder
$(CONTAINER_TOOL) buildx use galactic-builder
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f build/Dockerfile.cross .
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f containers/galactic/Dockerfile.cross .
- $(CONTAINER_TOOL) buildx rm galactic-builder
rm build/Dockerfile.cross

##@ Deployment

ifndef ignore-not-found
ignore-not-found = false
endif

.PHONY: install
install: kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | $(KUBECTL) apply -f -

.PHONY: uninstall
uninstall: kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/crd | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -
rm containers/galactic/Dockerfile.cross

##@ Cleanup

Expand Down
Loading
Loading