Skip to content

Commit

Permalink
kube,cmd/{k8s-operator,containerboot},envknob,ipn/store/kubestore,*/d…
Browse files Browse the repository at this point in the history
…epaware.txt: rename packages (tailscale#13418)

Rename kube/{types,client,api} -> kube/{kubetypes,kubeclient,kubeapi}
so that we don't need to rename the package on each import to
convey that it's kubernetes specific.

Updates#cleanup

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
  • Loading branch information
irbekrm authored Sep 8, 2024
1 parent d6dfb7f commit 209567e
Show file tree
Hide file tree
Showing 24 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions cmd/containerboot/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"net/netip"
"os"

kubeapi "tailscale.com/kube/api"
kubeclient "tailscale.com/kube/client"
"tailscale.com/kube/kubeapi"
"tailscale.com/kube/kubeclient"
"tailscale.com/tailcfg"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/containerboot/kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
kubeapi "tailscale.com/kube/api"
kubeclient "tailscale.com/kube/client"
"tailscale.com/kube/kubeapi"
"tailscale.com/kube/kubeclient"
)

func TestSetupKube(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/derper/depaware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ tailscale.com/cmd/derper dependencies: (generated by github.com/tailscale/depawa
tailscale.com/hostinfo from tailscale.com/net/netmon+
tailscale.com/ipn from tailscale.com/client/tailscale
tailscale.com/ipn/ipnstate from tailscale.com/client/tailscale+
tailscale.com/kube/types from tailscale.com/envknob
tailscale.com/kube/kubetypes from tailscale.com/envknob
tailscale.com/metrics from tailscale.com/cmd/derper+
tailscale.com/net/dnscache from tailscale.com/derp/derphttp
tailscale.com/net/ktimeout from tailscale.com/cmd/derper
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
tsoperator "tailscale.com/k8s-operator"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/tstime"
"tailscale.com/util/clientmetric"
"tailscale.com/util/set"
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/tstest"
"tailscale.com/util/mak"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/k8s-operator/depaware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,9 @@ tailscale.com/cmd/k8s-operator dependencies: (generated by github.com/tailscale/
tailscale.com/k8s-operator/sessionrecording/spdy from tailscale.com/k8s-operator/sessionrecording
tailscale.com/k8s-operator/sessionrecording/tsrecorder from tailscale.com/k8s-operator/sessionrecording+
tailscale.com/k8s-operator/sessionrecording/ws from tailscale.com/k8s-operator/sessionrecording
tailscale.com/kube/api from tailscale.com/ipn/store/kubestore+
tailscale.com/kube/client from tailscale.com/ipn/store/kubestore
tailscale.com/kube/types from tailscale.com/cmd/k8s-operator+
tailscale.com/kube/kubeapi from tailscale.com/ipn/store/kubestore+
tailscale.com/kube/kubeclient from tailscale.com/ipn/store/kubestore
tailscale.com/kube/kubetypes from tailscale.com/cmd/k8s-operator+
tailscale.com/licenses from tailscale.com/client/web
tailscale.com/log/filelogger from tailscale.com/logpolicy
tailscale.com/log/sockstatlog from tailscale.com/ipn/ipnlocal
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"tailscale.com/ipn"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/types/opt"
"tailscale.com/util/clientmetric"
"tailscale.com/util/set"
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/ingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"tailscale.com/ipn"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/types/ptr"
"tailscale.com/util/mak"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/nameserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"sigs.k8s.io/yaml"
tsoperator "tailscale.com/k8s-operator"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/tstime"
"tailscale.com/util/clientmetric"
"tailscale.com/util/set"
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"tailscale.com/ipn"
"tailscale.com/ipn/store/kubestore"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/tsnet"
"tailscale.com/tstime"
"tailscale.com/types/logger"
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/net/dns/resolvconffile"
"tailscale.com/tstest"
"tailscale.com/tstime"
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"tailscale.com/client/tailscale"
"tailscale.com/client/tailscale/apitype"
ksr "tailscale.com/k8s-operator/sessionrecording"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/tailcfg"
"tailscale.com/tsnet"
"tailscale.com/util/clientmetric"
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/sts.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"tailscale.com/ipn"
tsoperator "tailscale.com/k8s-operator"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/net/netutil"
"tailscale.com/tailcfg"
"tailscale.com/types/opt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-operator/svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
tsoperator "tailscale.com/k8s-operator"
tsapi "tailscale.com/k8s-operator/apis/v1alpha1"
kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/net/dns/resolvconffile"
"tailscale.com/tstime"
"tailscale.com/util/clientmetric"
Expand Down
2 changes: 1 addition & 1 deletion cmd/stund/depaware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tailscale.com/cmd/stund dependencies: (generated by github.com/tailscale/depawar
google.golang.org/protobuf/types/known/timestamppb from github.com/prometheus/client_golang/prometheus+
tailscale.com from tailscale.com/version
tailscale.com/envknob from tailscale.com/tsweb+
tailscale.com/kube/types from tailscale.com/envknob
tailscale.com/kube/kubetypes from tailscale.com/envknob
tailscale.com/metrics from tailscale.com/net/stunserver+
tailscale.com/net/netaddr from tailscale.com/net/tsaddr
tailscale.com/net/stun from tailscale.com/net/stunserver
Expand Down
2 changes: 1 addition & 1 deletion cmd/tailscale/depaware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ tailscale.com/cmd/tailscale dependencies: (generated by github.com/tailscale/dep
tailscale.com/internal/noiseconn from tailscale.com/cmd/tailscale/cli
tailscale.com/ipn from tailscale.com/client/tailscale+
tailscale.com/ipn/ipnstate from tailscale.com/client/tailscale+
tailscale.com/kube/types from tailscale.com/envknob
tailscale.com/kube/kubetypes from tailscale.com/envknob
tailscale.com/licenses from tailscale.com/client/web+
tailscale.com/metrics from tailscale.com/derp+
tailscale.com/net/captivedetection from tailscale.com/net/netcheck
Expand Down
6 changes: 3 additions & 3 deletions cmd/tailscaled/depaware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
L tailscale.com/ipn/store/awsstore from tailscale.com/ipn/store
L tailscale.com/ipn/store/kubestore from tailscale.com/ipn/store
tailscale.com/ipn/store/mem from tailscale.com/ipn/ipnlocal+
L tailscale.com/kube/api from tailscale.com/ipn/store/kubestore+
L tailscale.com/kube/client from tailscale.com/ipn/store/kubestore
tailscale.com/kube/types from tailscale.com/envknob
L tailscale.com/kube/kubeapi from tailscale.com/ipn/store/kubestore+
L tailscale.com/kube/kubeclient from tailscale.com/ipn/store/kubestore
tailscale.com/kube/kubetypes from tailscale.com/envknob
tailscale.com/licenses from tailscale.com/client/web
tailscale.com/log/filelogger from tailscale.com/logpolicy
tailscale.com/log/sockstatlog from tailscale.com/ipn/ipnlocal
Expand Down
2 changes: 1 addition & 1 deletion envknob/envknob.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"sync/atomic"
"time"

kubetypes "tailscale.com/kube/types"
"tailscale.com/kube/kubetypes"
"tailscale.com/types/opt"
"tailscale.com/version"
"tailscale.com/version/distro"
Expand Down
4 changes: 2 additions & 2 deletions ipn/store/kubestore/store_kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"time"

"tailscale.com/ipn"
kubeapi "tailscale.com/kube/api"
kubeclient "tailscale.com/kube/client"
"tailscale.com/kube/kubeapi"
"tailscale.com/kube/kubeclient"
"tailscale.com/types/logger"
)

Expand Down
4 changes: 2 additions & 2 deletions kube/api/api.go → kube/kubeapi/api.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

// Package api contains Kubernetes API types for internal consumption.
// Package kubeapi contains Kubernetes API types for internal consumption.
// These types are split into a separate package for consumption of
// non-Kubernetes shared libraries and binaries. Be mindful of not increasing
// dependency size for those consumers when adding anything new here.
package api
package kubeapi

import "time"

Expand Down
6 changes: 3 additions & 3 deletions kube/client/client.go → kube/kubeclient/client.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

// Package client provides a client to interact with Kubernetes.
// Package kubeclient provides a client to interact with Kubernetes.
// This package is Tailscale-internal and not meant for external consumption.
// Further, the API should not be considered stable.
// Client is split into a separate package for consumption of
// non-Kubernetes shared libraries and binaries. Be mindful of not increasing
// dependency size for those consumers when adding anything new here.
package client
package kubeclient

import (
"bytes"
Expand All @@ -26,7 +26,7 @@ import (
"sync"
"time"

kubeapi "tailscale.com/kube/api"
"tailscale.com/kube/kubeapi"
"tailscale.com/util/multierr"
)

Expand Down
4 changes: 2 additions & 2 deletions kube/client/fake_client.go → kube/kubeclient/fake_client.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

package client
package kubeclient

import (
"context"
"net"

kubeapi "tailscale.com/kube/api"
"tailscale.com/kube/kubeapi"
)

var _ Client = &FakeClient{}
Expand Down
4 changes: 2 additions & 2 deletions kube/types/grants.go → kube/kubetypes/grants.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

// Package types contains types and constants related to the Tailscale
// Package kubetypes contains types and constants related to the Tailscale
// Kubernetes Operator.
// These are split into a separate package for consumption of
// non-Kubernetes shared libraries and binaries. Be mindful of not increasing
// dependency size for those consumers when adding anything new here.
package types
package kubetypes

import "net/netip"

Expand Down
2 changes: 1 addition & 1 deletion kube/types/metrics.go → kube/kubetypes/metrics.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

package types
package kubetypes

const (
// Hostinfo App values for the Tailscale Kubernetes Operator components.
Expand Down

0 comments on commit 209567e

Please sign in to comment.