mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-22 02:50:42 +00:00
make ProxyGroupReady condition for kube-apiserver dependent on Service readiness
Change-Id: I951bcb9035521861bf3ca0ce037800692b23c77d Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
This commit is contained in:
@@ -146,6 +146,16 @@ func ProxyGroupAvailable(pg *tsapi.ProxyGroup) bool {
|
||||
return cond != nil && cond.Status == metav1.ConditionTrue
|
||||
}
|
||||
|
||||
func ProxyGroupTailscaleServiceValid(pg *tsapi.ProxyGroup) bool {
|
||||
cond := proxyGroupCondition(pg, tsapi.PGTailscaleServiceValid)
|
||||
return cond != nil && cond.Status == metav1.ConditionTrue && cond.ObservedGeneration == pg.Generation
|
||||
}
|
||||
|
||||
func ProxyGroupTailscaleServiceConfigured(pg *tsapi.ProxyGroup) bool {
|
||||
cond := proxyGroupCondition(pg, tsapi.PGTailscaleServiceConfigured)
|
||||
return cond != nil && cond.Status == metav1.ConditionTrue && cond.ObservedGeneration == pg.Generation
|
||||
}
|
||||
|
||||
func proxyGroupCondition(pg *tsapi.ProxyGroup, condType tsapi.ConditionType) *metav1.Condition {
|
||||
idx := xslices.IndexFunc(pg.Status.Conditions, func(cond metav1.Condition) bool {
|
||||
return cond.Type == string(condType)
|
||||
|
Reference in New Issue
Block a user