2
0
mirror of synced 2025-02-12 00:16:39 +00:00

30 lines
687 B
C#
Raw Normal View History

namespace KubernetesWorkflow.Recipe
2023-08-07 15:51:44 +02:00
{
public class PodLabels
{
private readonly Dictionary<string, string> labels = new Dictionary<string, string>();
public void Add(string key, string value)
2023-08-10 11:25:22 +02:00
{
2023-09-15 12:25:10 +02:00
labels.Add(key, K8sNameUtils.Format(value));
2023-08-10 11:25:22 +02:00
}
public PodLabels Clone()
2023-08-10 11:25:22 +02:00
{
var result = new PodLabels();
foreach (var entry in labels) result.Add(entry.Key, entry.Value);
return result;
2023-08-10 11:25:22 +02:00
}
public void Clear()
2023-08-07 15:51:44 +02:00
{
labels.Clear();
2023-08-17 11:06:45 +02:00
}
2023-08-07 15:51:44 +02:00
internal Dictionary<string, string> GetLabels()
{
return labels;
}
}
}