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

Feature: Multi-arch images #93

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

hbrewster-splunk
Copy link
Contributor

@hbrewster-splunk hbrewster-splunk commented Oct 19, 2021

Proposed changes

Splunk Observability needs to support multi architectural images. As an example use case, when we have a multi-architectural (arm64, amd64) node pool, the splunk-connect splunk-kubernetes-metrics DaemonSet requires a multi-arch image to run successfully.

In this PR @jsun-splunk and I have made alterations to the Dockerfile and GitHub workflow to support building a multi architectural image with docker buildx.

This repository does not contain CD for this image: we will need to discuss changes in the current CD process to support deployment from buildx. Note: (Please See [Ref 1] in PR code) The docker/build-push-action@v2 actions step does not currently support the buildx load options when there are used in conjunction with multiple build platforms (see: docker/buildx#59) . Hence for the purpose of this PR I have listed linux/amd64 only.

We have validated similar changes on all containers in splunk-connect-for-kubernetes and will be happy to raise PRs as appropriate once we have got this one right!

This PR

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I have read the CLA
  • I have added tests that prove my fix is effective or that my feature works
    We have built and deployed this container on a multi-architecture node pool as part of splunk-connect-for-kubernetes
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./docker/Dockerfile
platforms: linux/amd64
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[Ref 1]

id: prep
run: |
VERSION=`cat VERSION`
TAGS=splunk/k8s-metrics:$GITHUB_RUN_ID
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @hbrewster-splunk , if we use "splunk/k8s-metrics:$GITHUB_RUN_ID" as the image tags, we will have to make the change on this file: ci_scripts/deploy_connector.sh (line 21)
--set splunk-kubernetes-metrics.image.repository=k8s-metrics \
to --set splunk-kubernetes-metrics.image.tag=$GITHUB_RUN_ID \

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved

@mwang2016 mwang2016 merged commit 4bcd8c4 into splunk:develop Nov 3, 2021
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.

2 participants