diff --git a/app/Program.cs b/app/Program.cs index b720cd0..2ebd861 100644 --- a/app/Program.cs +++ b/app/Program.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; +using System.Runtime.InteropServices; var builder = WebApplication.CreateSlimBuilder(args); builder.Configuration.AddJsonFile("appsettings.json", true, true); @@ -10,7 +11,8 @@ var podName = builder.Configuration["POD_NAME"]; var namespaceName = builder.Configuration["NAMESPACE_NAME"]; message = string.IsNullOrEmpty(podName) || string.IsNullOrEmpty(namespaceName) ? message : $"{message} - from {podName} / {namespaceName}"; -var platform = System.Environment.OSVersion.Platform; +var platform = RuntimeInformation.OSArchitecture; +var platformValue = platform == Architecture.Arm64 ? "arm64" : "amd64" ; -app.MapGet("/", () => $"{message} on {platform}."); +app.MapGet("/", () => $"{message} on {platformValue}."); app.Run();