2023-09-20 08:13:29 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace KubernetesWorkflow
|
2023-04-12 13:22:09 +00:00
|
|
|
|
{
|
|
|
|
|
public class Configuration
|
|
|
|
|
{
|
2023-09-12 12:50:18 +00:00
|
|
|
|
public Configuration(string? kubeConfigFile, TimeSpan operationTimeout, TimeSpan retryDelay, string kubernetesNamespace)
|
2023-04-12 13:22:09 +00:00
|
|
|
|
{
|
|
|
|
|
KubeConfigFile = kubeConfigFile;
|
|
|
|
|
OperationTimeout = operationTimeout;
|
|
|
|
|
RetryDelay = retryDelay;
|
2023-09-12 12:50:18 +00:00
|
|
|
|
KubernetesNamespace = kubernetesNamespace;
|
2023-04-12 13:22:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string? KubeConfigFile { get; }
|
|
|
|
|
public TimeSpan OperationTimeout { get; }
|
|
|
|
|
public TimeSpan RetryDelay { get; }
|
2023-09-12 12:50:18 +00:00
|
|
|
|
public string KubernetesNamespace { get; }
|
2023-09-13 12:37:53 +00:00
|
|
|
|
public bool AllowNamespaceOverride { get; set; } = true;
|
2023-09-13 14:06:05 +00:00
|
|
|
|
public bool AddAppPodLabel { get; set; } = true;
|
2023-09-20 08:13:29 +00:00
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
2023-09-13 13:10:19 +00:00
|
|
|
|
public IK8sHooks Hooks { get; set; } = new DoNothingK8sHooks();
|
2023-04-12 13:22:09 +00:00
|
|
|
|
}
|
|
|
|
|
}
|