File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,14 @@ public async Task StartNamespace(string ns)
41
41
var deployments = await _client . AppsV1 . ListNamespacedDeploymentAsync ( ns ) ;
42
42
foreach ( var dep in deployments . Items )
43
43
{
44
- int replicas = 1 ;
44
+ int replicas = 0 ;
45
45
if ( dep . Metadata . Annotations != null &&
46
46
dep . Metadata . Annotations . TryGetValue ( "kubectl.kubernetes.io/last-applied-configuration" , out var json ) )
47
47
{
48
48
try
49
49
{
50
50
var lastApplied = JsonSerializer . Deserialize < V1Deployment > ( json ) ;
51
- replicas = lastApplied ? . Spec ? . Replicas ?? 1 ;
51
+ replicas = lastApplied ? . Spec ? . Replicas ;
52
52
}
53
53
catch { }
54
54
}
@@ -112,14 +112,14 @@ public async Task StartDeployment(string ns, string deployment)
112
112
{
113
113
var dep = await _client . AppsV1 . ReadNamespacedDeploymentAsync ( deployment , ns ) ;
114
114
115
- int replicas = 1 ;
115
+ int replicas = 0 ;
116
116
if ( dep . Metadata . Annotations != null &&
117
117
dep . Metadata . Annotations . TryGetValue ( "kubectl.kubernetes.io/last-applied-configuration" , out var json ) )
118
118
{
119
119
try
120
120
{
121
121
var lastApplied = JsonSerializer . Deserialize < V1Deployment > ( json ) ;
122
- replicas = lastApplied ? . Spec ? . Replicas ?? 1 ;
122
+ replicas = lastApplied ? . Spec ? . Replicas ;
123
123
}
124
124
catch { }
125
125
}
You can’t perform that action at this time.
0 commit comments