-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to omit non ready backends (#70)
* Allow users to choose if they want to include or exclude not ready backend pods from VCL. Signed-off-by: Tomash Sidei <[email protected]> Co-authored-by: Craig Ingram <[email protected]>
- Loading branch information
Showing
8 changed files
with
46 additions
and
6 deletions.
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 |
---|---|---|
|
@@ -868,6 +868,8 @@ spec: | |
items: | ||
type: string | ||
type: array | ||
onlyReady: | ||
type: boolean | ||
port: | ||
anyOf: | ||
- type: integer | ||
|
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
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,16 @@ | ||
package podutil | ||
|
||
import v1 "k8s.io/api/core/v1" | ||
|
||
func PodReady(pod v1.Pod) bool { | ||
if len(pod.Status.ContainerStatuses) == 0 { | ||
return false | ||
} | ||
for _, status := range pod.Status.ContainerStatuses { | ||
if !status.Ready { | ||
return false | ||
} | ||
} | ||
|
||
return true | ||
} |
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 |
---|---|---|
|
@@ -871,6 +871,8 @@ spec: | |
items: | ||
type: string | ||
type: array | ||
onlyReady: | ||
type: boolean | ||
port: | ||
anyOf: | ||
- type: integer | ||
|