@@ -13,7 +13,7 @@ double ConvertToUnixTimestamp(DateTime date)
13
13
14
14
async Task RestartDaemonSetAsync ( string name , string @namespace , IKubernetes client )
15
15
{
16
- var daemonSet = await client . ReadNamespacedDaemonSetAsync ( name , @namespace ) ;
16
+ var daemonSet = await client . AppsV1 . ReadNamespacedDaemonSetAsync ( name , @namespace ) ;
17
17
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy . CamelCase , WriteIndented = true } ;
18
18
var old = JsonSerializer . SerializeToDocument ( daemonSet , options ) ;
19
19
@@ -27,12 +27,12 @@ async Task RestartDaemonSetAsync(string name, string @namespace, IKubernetes cli
27
27
var expected = JsonSerializer . SerializeToDocument ( daemonSet ) ;
28
28
29
29
var patch = old . CreatePatch ( expected ) ;
30
- await client . PatchNamespacedDaemonSetAsync ( new V1Patch ( patch , V1Patch . PatchType . JsonPatch ) , name , @namespace ) ;
30
+ await client . AppsV1 . PatchNamespacedDaemonSetAsync ( new V1Patch ( patch , V1Patch . PatchType . JsonPatch ) , name , @namespace ) ;
31
31
}
32
32
33
33
async Task RestartDeploymentAsync ( string name , string @namespace , IKubernetes client )
34
34
{
35
- var deployment = await client . ReadNamespacedDeploymentAsync ( name , @namespace ) ;
35
+ var deployment = await client . AppsV1 . ReadNamespacedDeploymentAsync ( name , @namespace ) ;
36
36
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy . CamelCase , WriteIndented = true } ;
37
37
var old = JsonSerializer . SerializeToDocument ( deployment , options ) ;
38
38
@@ -46,12 +46,12 @@ async Task RestartDeploymentAsync(string name, string @namespace, IKubernetes cl
46
46
var expected = JsonSerializer . SerializeToDocument ( deployment ) ;
47
47
48
48
var patch = old . CreatePatch ( expected ) ;
49
- await client . PatchNamespacedDeploymentAsync ( new V1Patch ( patch , V1Patch . PatchType . JsonPatch ) , name , @namespace ) ;
49
+ await client . AppsV1 . PatchNamespacedDeploymentAsync ( new V1Patch ( patch , V1Patch . PatchType . JsonPatch ) , name , @namespace ) ;
50
50
}
51
51
52
52
async Task RestartStatefulSetAsync ( string name , string @namespace , IKubernetes client )
53
53
{
54
- var deployment = await client . ReadNamespacedStatefulSetAsync ( name , @namespace ) ;
54
+ var deployment = await client . AppsV1 . ReadNamespacedStatefulSetAsync ( name , @namespace ) ;
55
55
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy . CamelCase , WriteIndented = true } ;
56
56
var old = JsonSerializer . SerializeToDocument ( deployment , options ) ;
57
57
@@ -65,7 +65,7 @@ async Task RestartStatefulSetAsync(string name, string @namespace, IKubernetes c
65
65
var expected = JsonSerializer . SerializeToDocument ( deployment ) ;
66
66
67
67
var patch = old . CreatePatch ( expected ) ;
68
- await client . PatchNamespacedStatefulSetAsync ( new V1Patch ( patch , V1Patch . PatchType . JsonPatch ) , name , @namespace ) ;
68
+ await client . AppsV1 . PatchNamespacedStatefulSetAsync ( new V1Patch ( patch , V1Patch . PatchType . JsonPatch ) , name , @namespace ) ;
69
69
}
70
70
71
71
var config = KubernetesClientConfiguration . BuildConfigFromConfigFile ( ) ;
0 commit comments