Skip to content

Commit be2f34b

Browse files
committed
Add arm64 support, dotnet patcher with chaining is still x64 only
1 parent ca1851d commit be2f34b

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

.github/workflows/pipeline.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ jobs:
6363
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6464
with:
6565
submodules: true
66+
- name: Setup QEMU
67+
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
68+
with:
69+
platforms: arm64
6670
- uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
6771
id: buildx
6872
with:
@@ -88,6 +92,7 @@ jobs:
8892
with:
8993
file: Dockerfile
9094
context: .
95+
platforms: "linux/amd64,linux/arm64"
9196
push: ${{ github.event_name != 'pull_request' }} # don't push the image for PR builds
9297
cache-from: ${{ github.actor != 'dependabot[bot]' && format('type=registry,ref={0}:cache', env.IMAGE_NAME) || ''}}
9398
cache-to: ${{ github.actor != 'dependabot[bot]' && format('type=registry,ref={0}:cache,mode=max', env.IMAGE_NAME) || ''}}

src/Contrast.K8s.AgentOperator/Core/Reactions/Injecting/Patching/Agents/DotNetPatcher.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public IEnumerable<V1EnvVar> GenerateEnvVars(PatchingContext context)
3131
{
3232
yield return new V1EnvVar("CORECLR_PROFILER", "{8B2CE134-0948-48CA-A4B2-80DDAD9F5791}");
3333
yield return new V1EnvVar("CORECLR_PROFILER_PATH", $"{context.AgentMountPath}/runtimes/linux-x64/native/ContrastProfiler.so");
34+
yield return new V1EnvVar("CORECLR_PROFILER_PATH_ARM64", $"{context.AgentMountPath}/runtimes/linux-arm64/native/ContrastProfiler.so");
3435
yield return new V1EnvVar("CORECLR_ENABLE_PROFILING", "1");
3536
}
3637

tests/Contrast.K8s.AgentOperator.FunctionalTests/Scenarios/Injection/Agents/DotnetInjectionTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public async Task When_injected_then_pod_should_have_agent_injection_environment
3939
.Which.Value.Should().Be("{8B2CE134-0948-48CA-A4B2-80DDAD9F5791}");
4040
container.Env.Should().Contain(x => x.Name == "CORECLR_PROFILER_PATH")
4141
.Which.Value.Should().Be("/contrast/agent/runtimes/linux-x64/native/ContrastProfiler.so");
42+
container.Env.Should().Contain(x => x.Name == "CORECLR_PROFILER_PATH_ARM64")
43+
.Which.Value.Should().Be("/contrast/agent/runtimes/linux-arm64/native/ContrastProfiler.so");
4244
container.Env.Should().Contain(x => x.Name == "CORECLR_ENABLE_PROFILING")
4345
.Which.Value.Should().Be("1");
4446
container.Env.Should().Contain(x => x.Name == "CONTRAST_INSTALL_SOURCE")

tests/Contrast.K8s.AgentOperator.Tests/Core/Reactions/Injecting/Patching/Agents/DotNetPatcherTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public void GenerateEnvVars_should_return_profiling_vars()
2727
{
2828
"CORECLR_PROFILER",
2929
"CORECLR_PROFILER_PATH",
30+
"CORECLR_PROFILER_PATH_ARM64",
3031
"CORECLR_ENABLE_PROFILING",
3132
"CONTRAST_INSTALL_SOURCE",
3233
"CONTRAST_INSTALLATION_TOOL",

0 commit comments

Comments
 (0)