* generated based on 1.33 * Update version to 17.0 in version.json * Remove extra API endpoint from swagger.json * Remove ModelConverter and related AutoMapper components * Update package versions * Refactor code to use ConfigureAwait(false) for asynchronous calls and update target framework to net9.0 * Remove ConfigureAwait(false) from OidcAuthTests for consistency in async calls * Update SDK version in README to reflect support for net8.0 and net9.0 * Update dotnet SDK version to 9.0.x in build workflow * Revert Fractions package version to 7.3.0 in Directory.Packages.props * Update target framework to netstandard2.1 for improved compatibility * Update package references for Microsoft.CodeAnalysis in Directory.Packages.props and LibKubernetesGenerator.target * Refactor Worker class constructor documentation and standardize Dictionary type declaration in Program.cs
29 lines
706 B
C#
29 lines
706 B
C#
using k8s;
|
|
using k8s.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace yaml
|
|
{
|
|
internal class Program
|
|
{
|
|
private static async Task Main(string[] args)
|
|
{
|
|
var typeMap = new Dictionary<string, Type>
|
|
{
|
|
{ "v1/Pod", typeof(V1Pod) },
|
|
{ "v1/Service", typeof(V1Service) },
|
|
{ "apps/v1/Deployment", typeof(V1Deployment) },
|
|
};
|
|
|
|
var objects = await KubernetesYaml.LoadAllFromFileAsync(args[0], typeMap).ConfigureAwait(false);
|
|
|
|
foreach (var obj in objects)
|
|
{
|
|
Console.WriteLine(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|