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