Esempio n. 1
0
 public DeploymentSecretBackup(string secretName, string deviceNamespace, KubernetesModuleOwner moduleOwner, ISerde <DeploymentConfigInfo> serde, IKubernetes client)
 {
     this.Name            = Preconditions.CheckNonWhiteSpace(secretName, nameof(secretName));
     this.deviceNamespace = Preconditions.CheckNonWhiteSpace(deviceNamespace, nameof(deviceNamespace));
     this.moduleOwner     = Preconditions.CheckNotNull(moduleOwner, nameof(moduleOwner));
     this.serde           = Preconditions.CheckNotNull(serde, nameof(serde));
     this.client          = Preconditions.CheckNotNull(client, nameof(client));
 }
Esempio n. 2
0
 public KubernetesModule(IModule module, KubernetesConfig config, KubernetesModuleOwner owner)
 {
     this.Name              = module.Name;
     this.Version           = module.Version;
     this.Type              = module.Type;
     this.DesiredStatus     = module.DesiredStatus;
     this.RestartPolicy     = module.RestartPolicy;
     this.ConfigurationInfo = module.ConfigurationInfo ?? new ConfigurationInfo(string.Empty);
     this.Env             = module.Env?.ToImmutableDictionary() ?? ImmutableDictionary <string, EnvVal> .Empty;
     this.ImagePullPolicy = module.ImagePullPolicy;
     this.Config          = config;
     this.Owner           = owner;
 }
Esempio n. 3
0
 public KubernetesModule(
     string name,
     string version,
     string type,
     ModuleStatus status,
     RestartPolicy restartPolicy,
     ConfigurationInfo configurationInfo,
     IDictionary <string, EnvVal> env,
     KubernetesConfig settings,
     ImagePullPolicy imagePullPolicy,
     KubernetesModuleOwner owner)
 {
     this.Name              = name;
     this.Version           = version;
     this.Type              = type;
     this.DesiredStatus     = status;
     this.RestartPolicy     = restartPolicy;
     this.ConfigurationInfo = configurationInfo ?? new ConfigurationInfo(string.Empty);
     this.Env             = env?.ToImmutableDictionary() ?? ImmutableDictionary <string, EnvVal> .Empty;
     this.Config          = settings;
     this.ImagePullPolicy = imagePullPolicy;
     this.Owner           = owner;
 }