cmd/k8s-operator,k8s-operator/apis: set a readiness condition on egress Services for ProxyGroup (#13746)

cmd/k8s-operator,k8s-operator/apis: set a readiness condition on egress Services

Set a readiness condition on ExternalName Services that define a tailnet target
to route cluster traffic to via a ProxyGroup's proxies. The condition
is set to true if at least one proxy is currently set up to route.

Updates tailscale/tailscale#13406

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
Irbe Krumina
2024-10-09 18:23:40 +01:00
committed by GitHub
parent 94c79659fa
commit 89ee6bbdae
5 changed files with 420 additions and 14 deletions

View File

@ -172,14 +172,19 @@ type ConditionType string
const (
ConnectorReady ConditionType = `ConnectorReady`
ProxyClassReady ConditionType = `ProxyClassReady`
ProxyGroupReady ConditionType = `ProxyGroupReady`
ProxyGroupReady ConditionType = `TailscaleProxyGroupReady`
ProxyReady ConditionType = `TailscaleProxyReady` // a Tailscale-specific condition type for corev1.Service
RecorderReady ConditionType = `RecorderReady`
// EgressSvcValid is set to true if the user configured ExternalName Service for exposing a tailnet target on
// ProxyGroup nodes is valid.
EgressSvcValid ConditionType = `EgressSvcValid`
// EgressSvcConfigured is set to true if the configuration for the egress Service (proxy ConfigMap update,
// EndpointSlice for the Service) has been successfully applied. The Reason for this condition
// contains the name of the ProxyGroup and the hash of the Service ports and the tailnet target.
EgressSvcConfigured ConditionType = `EgressSvcConfigured`
// EgressSvcValid gets set on a user configured ExternalName Service that defines a tailnet target to be exposed
// on a ProxyGroup.
// Set to true if the user provided configuration is valid.
EgressSvcValid ConditionType = `TailscaleEgressSvcValid`
// EgressSvcConfigured gets set on a user configured ExternalName Service that defines a tailnet target to be exposed
// on a ProxyGroup.
// Set to true if the cluster resources for the service have been successfully configured.
EgressSvcConfigured ConditionType = `TailscaleEgressSvcConfigured`
// EgressSvcReady gets set on a user configured ExternalName Service that defines a tailnet target to be exposed
// on a ProxyGroup.
// Set to true if the service is ready to route cluster traffic.
EgressSvcReady ConditionType = `TailscaleEgressSvcReady`
)