-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using k8s.Models; | ||
|
||
namespace Extension.k8s; | ||
|
||
public static class DaemonSetExtension | ||
{ | ||
public static bool IsReady(this V1DaemonSetStatus status) | ||
{ | ||
if (status.DesiredNumberScheduled == status.NumberAvailable && | ||
status.DesiredNumberScheduled == status.NumberReady) | ||
{ | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Collections.Generic; | ||
using k8s.Models; | ||
|
||
namespace Extension.k8s; | ||
|
||
public static class StatefulSetExtension | ||
{ | ||
public static bool IsReady(this IList<V1StatefulSetCondition> conditions) | ||
{ | ||
foreach (var condition in conditions) | ||
{ | ||
if (condition is { Type: "Ready", Status: "True" }) | ||
{ | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
} |