Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: skaffold build experiment #3179

Merged
merged 2 commits into from
Nov 13, 2023
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
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ control-plane-dev-docker: ## Build consul-k8s-control-plane dev Docker image.
--build-arg 'GIT_DESCRIBE=$(GIT_DESCRIBE)' \
-f $(CURDIR)/control-plane/Dockerfile $(CURDIR)/control-plane

# DANGER: this target is experimental and could be modified/removed at any time.
# Build consul-k8s-control-plane dev Docker image for use with skaffold or local development.
control-plane-dev-skaffold:
@$(SHELL) $(CURDIR)/control-plane/build-support/scripts/build-local.sh -o linux -a $(GOARCH)
@docker build -t '$(DEV_IMAGE)' \
--build-arg 'TARGETARCH=$(GOARCH)' \
-f $(CURDIR)/control-plane/Dockerfile.dev $(CURDIR)/control-plane

check-remote-dev-image-env:
ifndef REMOTE_DEV_IMAGE
$(error REMOTE_DEV_IMAGE is undefined: set this image to <your_docker_repo>/<your_docker_image>:<image_tag>, e.g. hashicorp/consul-k8s-dev:latest)
Expand Down
11 changes: 11 additions & 0 deletions control-plane/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# DANGER: this dockerfile is experimental and could be modified/removed at any time.
# A simple image for testing changes to consul-k8s
#
# Meant to be used with the following make target
# DEV_IMAGE=<name:tag> make control-plane-dev-skaffold

FROM hashicorp/consul-k8s-control-plane as cache
zalimeni marked this conversation as resolved.
Show resolved Hide resolved
ARG TARGETARCH

COPY pkg/bin/linux_${TARGETARCH}/consul-k8s-control-plane /bin
COPY cni/pkg/bin/linux_${TARGETARCH}/consul-cni /bin