Files
csharp/src/KubernetesClient/KubeConfigModels/Context.cs
Frederik Carlier 6f5706d753 Fix kubeconfig extension handling (#556)
Extensions on kubeconfig files are stored as a list of NamedExtension objects, not a dictionary.
2021-01-27 08:57:40 -08:00

36 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using YamlDotNet.Serialization;
namespace k8s.KubeConfigModels
{
/// <summary>
/// Relates nicknames to context information.
/// </summary>
public class Context
{
/// <summary>
/// Gets or sets the context information.
/// </summary>
[YamlMember(Alias = "context")]
public ContextDetails ContextDetails { get; set; }
/// <summary>
/// Gets or sets the nickname for this context.
/// </summary>
[YamlMember(Alias = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets additional information. This is useful for extenders so that reads and writes don't clobber unknown fields.
/// </summary>
[YamlMember(Alias = "extensions")]
public IEnumerable<NamedExtension> Extensions { get; set; }
[Obsolete("This property is not set by the YAML config. Use ContextDetails.Namespace instead.")]
[YamlMember(Alias = "namespace")]
public string Namespace { get; set; }
}
}