mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-05 15:03:12 +00:00
30 lines
687 B
C#
30 lines
687 B
C#
namespace KubernetesWorkflow.Recipe
|
|
{
|
|
public class PodLabels
|
|
{
|
|
private readonly Dictionary<string, string> labels = new Dictionary<string, string>();
|
|
|
|
public void Add(string key, string value)
|
|
{
|
|
labels.Add(key, K8sNameUtils.Format(value));
|
|
}
|
|
|
|
public PodLabels Clone()
|
|
{
|
|
var result = new PodLabels();
|
|
foreach (var entry in labels) result.Add(entry.Key, entry.Value);
|
|
return result;
|
|
}
|
|
|
|
public void Clear()
|
|
{
|
|
labels.Clear();
|
|
}
|
|
|
|
internal Dictionary<string, string> GetLabels()
|
|
{
|
|
return labels;
|
|
}
|
|
}
|
|
}
|