kube,cmd/{k8s-operator,containerboot},envknob,ipn/store/kubestore,*/depaware.txt: split out kube types (#13417)

Further split kube package into kube/{client,api,types}. This is so that
consumers who only need constants/static types don't have to import
the client and api bits.

Updates#cleanup

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
Irbe Krumina
2024-09-08 21:06:07 +03:00
committed by GitHub
parent ecd64f6ed9
commit d6dfb7f242
24 changed files with 143 additions and 122 deletions

View File

@@ -31,7 +31,7 @@ import (
"tailscale.com/ipn"
tsoperator "tailscale.com/k8s-operator"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
"tailscale.com/kube"
kubetypes "tailscale.com/kube/types"
"tailscale.com/net/netutil"
"tailscale.com/tailcfg"
"tailscale.com/types/opt"
@@ -626,16 +626,16 @@ func (a *tailscaleSTSReconciler) reconcileSTS(ctx context.Context, logger *zap.S
func appInfoForProxy(cfg *tailscaleSTSConfig) (string, error) {
if cfg.ClusterTargetDNSName != "" || cfg.ClusterTargetIP != "" {
return kube.AppIngressProxy, nil
return kubetypes.AppIngressProxy, nil
}
if cfg.TailnetTargetFQDN != "" || cfg.TailnetTargetIP != "" {
return kube.AppEgressProxy, nil
return kubetypes.AppEgressProxy, nil
}
if cfg.ServeConfig != nil {
return kube.AppIngressResource, nil
return kubetypes.AppIngressResource, nil
}
if cfg.Connector != nil {
return kube.AppConnector, nil
return kubetypes.AppConnector, nil
}
return "", errors.New("unable to determine proxy type")
}