Justin Kotalik
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
0 deletions
-
src/Tye.Core/KubernetesManifestGenerator.cs
-
src/Tye.Core/Service.cs
-
src/tye/Program.DeployCommand.cs
|
|
|
@ -108,6 +108,8 @@ namespace Tye |
|
|
|
var spec = new YamlMappingNode(); |
|
|
|
root.Add("spec", spec); |
|
|
|
|
|
|
|
spec.Add("replicas", service.Service.Replicas.ToString()); |
|
|
|
|
|
|
|
var selector = new YamlMappingNode(); |
|
|
|
spec.Add("selector", selector); |
|
|
|
|
|
|
|
|
|
|
|
@ -26,5 +26,7 @@ namespace Tye |
|
|
|
// Represents bindings *published* by this service
|
|
|
|
// See GeneratedAssets for bindings consumed by the service
|
|
|
|
public List<ServiceBinding> Bindings { get; } = new List<ServiceBinding>(); |
|
|
|
|
|
|
|
public int Replicas { get; set; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -77,6 +77,8 @@ namespace Tye |
|
|
|
Source = project, |
|
|
|
}; |
|
|
|
|
|
|
|
service.Replicas = configService.Replicas ?? 1; |
|
|
|
|
|
|
|
foreach (var configBinding in configService.Bindings) |
|
|
|
{ |
|
|
|
service.Bindings.Add(new ServiceBinding(configBinding.Name ?? service.Name) |
|
|
|
|