* first lib model * add missing files * happy test * add vanilla rest for extend * fix new url pattern * address comments * add v to tag * bump ver * add missing file when ren * support multi pkg * fix gh action * fix env var * ren title * use gh action to set ver * remove unused * remove unused
26 lines
651 B
C#
26 lines
651 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using k8s;
|
|
using k8s.Models;
|
|
|
|
namespace yaml
|
|
{
|
|
internal class Program
|
|
{
|
|
private async static Task Main(string[] args)
|
|
{
|
|
var typeMap = new Dictionary<String, Type>();
|
|
typeMap.Add("v1/Pod", typeof(V1Pod));
|
|
typeMap.Add("v1/Service", typeof(V1Service));
|
|
typeMap.Add("apps/v1/Deployment", typeof(V1Deployment));
|
|
|
|
var objects = await Yaml.LoadAllFromFileAsync(args[0], typeMap);
|
|
|
|
foreach (var obj in objects) {
|
|
Console.WriteLine(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|