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

*: Add sds and envoyinit to the release pipeline #10509

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

timflannagan
Copy link
Member

@timflannagan timflannagan commented Jan 24, 2025

Description

Update the .goreleaser.yaml configuration and add the sds and envoy init containers to the release pipeline. See #10441 for the high-level tracker for this stream of work.

Related to #10423.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@timflannagan timflannagan force-pushed the release/publish-other-images branch from f668023 to d9457fa Compare January 24, 2025 20:26
Comment on lines +58 to +59
- uses: "docker/setup-qemu-action@v3"
- uses: "docker/setup-buildx-action@v3"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for the SDS container build. Otherwise, the release action was failing when I was testing this out in my fork: https://github.com/timflannagan/kgateway/actions/runs/12942255998/job/36099680490.

# BASE_IMAGE used in non distroless variants
ALPINE_BASE_IMAGE ?= alpine:3.17.6
# BASE_IMAGE used in non distroless variants. Exported for use in goreleaser.yaml.
export ALPINE_BASE_IMAGE ?= alpine:3.17.6
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about migrating away from alpine in favor of distroless or some other base image. I held off for now as I want to focus on getting the full release pipeline working e2e before standardizing on our approach for base images.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we track removing alpine explicitly in an issue? Either to the release automation or the cleanup epic, whichever makes more sense to you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, will do.

&& rm -rf /var/log/*log /var/lib/apt/lists/* /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old

COPY envoyinit-linux-$GOARCH /usr/local/bin/envoyinit

# SDS-specific setup, only used if ENVOY_SIDECAR=true
COPY docker-entrypoint.sh /
ARG ENTRYPOINT_SCRIPT=/docker-entrypoint.sh
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was needed as goreleaser's extra_files argument adds the path (e.g. projects/envoyinit/cmd/docker-entrypoint.sh in this case) to the build context, while this regular envoyinit-docker Makefile target fails if I hardcode the COPY projects/envoyinit/cmd/docker-entrypoint.sh / instruction.

@@ -43,11 +73,69 @@ dockers:
- "--platform=linux/amd64"
- "--build-arg=GOARCH=amd64"
- "--build-arg=ENVOY_IMAGE={{ .Env.ENVOY_GLOO_IMAGE }}"
- image_templates:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we put the images in the same order as controller image (i.e. arm first), so it's easier to read?

- image_templates:
- &sds_amd_image "{{ .Env.IMAGE_REGISTRY }}/{{ .Env.SDS_IMAGE_REPO }}:{{ .Env.VERSION }}-amd64"
use: buildx
dockerfile: &sds_dockerfile projects/sds/cmd/Dockerfile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the controller image above, there's the extra dockerfile arg for arm but not amd; why is it the other way around here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jenshu Hmm, I'm not sure I follow. I didn't see any skew in the diff.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, it's fixed now that you swapped amd and arm :)

@jenshu jenshu self-requested a review January 27, 2025 17:56
@timflannagan timflannagan force-pushed the release/publish-other-images branch from d9457fa to c8f59c1 Compare January 27, 2025 18:42
@timflannagan
Copy link
Member Author

Messed my branch up locally. Just pushed a commit for ordering the config more consistently.

@lgadban lgadban added this pull request to the merge queue Jan 27, 2025
@lgadban lgadban removed this pull request from the merge queue due to a manual request Jan 27, 2025
@lgadban lgadban added this pull request to the merge queue Jan 27, 2025
Merged via the queue into kgateway-dev:main with commit 7fbfc2e Jan 27, 2025
8 checks passed
@timflannagan timflannagan deleted the release/publish-other-images branch January 27, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants