Skip to content

Commit

Permalink
Enable linter goimports to tidy imports (antrea-io#1037)
Browse files Browse the repository at this point in the history
goimports makes imports deterministic, putting them in 3 sections:
builtin, 3rd-party, local packages. It saves reviewers's effort to
comment the order of imports.

It doesn't allow imports named "v1" unless the alias name is specified
as "v1", this patch adds the parent packages of v1 packages as the
prefix of the import names.
  • Loading branch information
tnqn committed Aug 6, 2020
1 parent 3f84fe3 commit 74055d7
Show file tree
Hide file tree
Showing 22 changed files with 119 additions and 115 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ run:
- ".*\\.pb\\.go"
skip-dirs-use-default: true

linters-settings:
goimports:
local-prefixes: github.com/vmware-tanzu/antrea

linters:
disable-all: true
enable:
Expand All @@ -14,3 +18,4 @@ linters:
- deadcode
- staticcheck
- gosec
- goimports
8 changes: 4 additions & 4 deletions cmd/antrea-cni/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ package main
import (
"fmt"

"github.com/containernetworking/cni/pkg/skel"
cniversion "github.com/containernetworking/cni/pkg/version"

"github.com/vmware-tanzu/antrea/pkg/cni"
"github.com/vmware-tanzu/antrea/pkg/log"
"github.com/vmware-tanzu/antrea/pkg/version"

"github.com/containernetworking/cni/pkg/skel"
cni_version "github.com/containernetworking/cni/pkg/version"
)

func init() {
Expand All @@ -34,7 +34,7 @@ func main() {
cni.ActionAdd.Request,
cni.ActionCheck.Request,
cni.ActionDel.Request,
cni_version.All,
cniversion.All,
fmt.Sprintf("Antrea CNI %s", version.GetFullVersionWithRuntimeInfo()),
)
}
1 change: 1 addition & 0 deletions pkg/agent/cniserver/ipam/ipam_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (

"github.com/containernetworking/cni/pkg/invoke"
"github.com/containernetworking/cni/pkg/types/current"

cnipb "github.com/vmware-tanzu/antrea/pkg/apis/cni/v1beta1"
)

Expand Down
18 changes: 9 additions & 9 deletions pkg/agent/controller/noderoute/node_route_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"time"

"github.com/containernetworking/plugins/pkg/ip"
"k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/informers"
Expand Down Expand Up @@ -115,16 +115,16 @@ func NewNodeRouteController(
}

// enqueueNode adds an object to the controller work queue
// obj could be an *v1.Node, or a DeletionFinalStateUnknown item.
// obj could be an *corev1.Node, or a DeletionFinalStateUnknown item.
func (c *Controller) enqueueNode(obj interface{}) {
node, isNode := obj.(*v1.Node)
node, isNode := obj.(*corev1.Node)
if !isNode {
deletedState, ok := obj.(cache.DeletedFinalStateUnknown)
if !ok {
klog.Errorf("Received unexpected object: %v", obj)
return
}
node, ok = deletedState.Obj.(*v1.Node)
node, ok = deletedState.Obj.(*corev1.Node)
if !ok {
klog.Errorf("DeletedFinalStateUnknown contains non-Node object: %v", deletedState.Obj)
return
Expand Down Expand Up @@ -384,7 +384,7 @@ func (c *Controller) deleteNodeRoute(nodeName string) error {
return nil
}

func (c *Controller) addNodeRoute(nodeName string, node *v1.Node) error {
func (c *Controller) addNodeRoute(nodeName string, node *corev1.Node) error {
if _, installed := c.installedNodes.Load(nodeName); installed {
// Route is already added for this Node.
return nil
Expand Down Expand Up @@ -523,15 +523,15 @@ func ParseTunnelInterfaceConfig(

// GetNodeAddr gets the available IP address of a Node. GetNodeAddr will first try to get the
// NodeInternalIP, then try to get the NodeExternalIP.
func GetNodeAddr(node *v1.Node) (net.IP, error) {
addresses := make(map[v1.NodeAddressType]string)
func GetNodeAddr(node *corev1.Node) (net.IP, error) {
addresses := make(map[corev1.NodeAddressType]string)
for _, addr := range node.Status.Addresses {
addresses[addr.Type] = addr.Address
}
var ipAddrStr string
if internalIP, ok := addresses[v1.NodeInternalIP]; ok {
if internalIP, ok := addresses[corev1.NodeInternalIP]; ok {
ipAddrStr = internalIP
} else if externalIP, ok := addresses[v1.NodeExternalIP]; ok {
} else if externalIP, ok := addresses[corev1.NodeExternalIP]; ok {
ipAddrStr = externalIP
} else {
return nil, fmt.Errorf("node %s has neither external ip nor internal ip", node.Name)
Expand Down
6 changes: 3 additions & 3 deletions pkg/agent/controller/traceflow/traceflow_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"sync"
"time"

"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
clientset "k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -291,7 +291,7 @@ func (c *Controller) injectPacket(tf *opsv1alpha1.Traceflow) error {
dstMAC = dstPodInterfaces[0].MAC.String()
dstIP = dstPodInterfaces[0].IP.String()
} else {
dstPod, err := c.kubeClient.CoreV1().Pods(tf.Spec.Destination.Namespace).Get(context.TODO(), tf.Spec.Destination.Pod, v1.GetOptions{})
dstPod, err := c.kubeClient.CoreV1().Pods(tf.Spec.Destination.Namespace).Get(context.TODO(), tf.Spec.Destination.Pod, metav1.GetOptions{})
if err != nil {
return err
}
Expand Down Expand Up @@ -367,7 +367,7 @@ func (c *Controller) errorTraceflowCRD(tf *opsv1alpha1.Traceflow, reason string)
}
patchData := Traceflow{Status: opsv1alpha1.TraceflowStatus{Phase: tf.Status.Phase, Reason: reason}}
payloads, _ := json.Marshal(patchData)
return c.traceflowClient.OpsV1alpha1().Traceflows().Patch(context.TODO(), tf.Name, types.MergePatchType, payloads, v1.PatchOptions{}, "status")
return c.traceflowClient.OpsV1alpha1().Traceflows().Patch(context.TODO(), tf.Name, types.MergePatchType, payloads, metav1.PatchOptions{}, "status")
}

// Deallocate tag from cache. Ignore DataplaneTag == 0 which is invalid case.
Expand Down
10 changes: 5 additions & 5 deletions pkg/apiserver/certificate/cacert_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"time"

"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apiserver/pkg/server/dynamiccertificates"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -109,15 +109,15 @@ func (c *CACertController) syncCACert() error {
func (c *CACertController) syncAPIServices(caCert []byte) error {
klog.Info("Syncing CA certificate with APIServices")
for _, name := range apiServiceNames {
apiService, err := c.aggregatorClient.ApiregistrationV1().APIServices().Get(context.TODO(), name, v1.GetOptions{})
apiService, err := c.aggregatorClient.ApiregistrationV1().APIServices().Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
return fmt.Errorf("error getting APIService %s: %v", name, err)
}
if bytes.Equal(apiService.Spec.CABundle, caCert) {
continue
}
apiService.Spec.CABundle = caCert
if _, err := c.aggregatorClient.ApiregistrationV1().APIServices().Update(context.TODO(), apiService, v1.UpdateOptions{}); err != nil {
if _, err := c.aggregatorClient.ApiregistrationV1().APIServices().Update(context.TODO(), apiService, metav1.UpdateOptions{}); err != nil {
return fmt.Errorf("error updating antrea CA cert of APIService %s: %v", name, err)
}
}
Expand All @@ -129,7 +129,7 @@ func (c *CACertController) syncConfigMap(caCert []byte) error {
klog.Info("Syncing CA certificate with ConfigMap")
// Use the Antrea Pod Namespace for the CA cert ConfigMap.
caConfigMapNamespace := GetCAConfigMapNamespace()
caConfigMap, err := c.client.CoreV1().ConfigMaps(caConfigMapNamespace).Get(context.TODO(), CAConfigMapName, v1.GetOptions{})
caConfigMap, err := c.client.CoreV1().ConfigMaps(caConfigMapNamespace).Get(context.TODO(), CAConfigMapName, metav1.GetOptions{})
if err != nil {
return fmt.Errorf("error getting ConfigMap %s: %v", CAConfigMapName, err)
}
Expand All @@ -139,7 +139,7 @@ func (c *CACertController) syncConfigMap(caCert []byte) error {
caConfigMap.Data = map[string]string{
CAConfigMapKey: string(caCert),
}
if _, err := c.client.CoreV1().ConfigMaps(caConfigMapNamespace).Update(context.TODO(), caConfigMap, v1.UpdateOptions{}); err != nil {
if _, err := c.client.CoreV1().ConfigMaps(caConfigMapNamespace).Update(context.TODO(), caConfigMap, metav1.UpdateOptions{}); err != nil {
return fmt.Errorf("error updating ConfigMap %s: %v", CAConfigMapName, err)
}
return nil
Expand Down
6 changes: 3 additions & 3 deletions pkg/apiserver/registry/networkpolicy/addressgroup/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/apis/meta/internalversion"
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/apiserver/pkg/registry/rest"
Expand Down Expand Up @@ -57,7 +57,7 @@ func (r *REST) NewList() runtime.Object {
return &networking.AddressGroupList{}
}

func (r *REST) Get(ctx context.Context, name string, options *v1.GetOptions) (runtime.Object, error) {
func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
addressGroup, exists, err := r.addressGroupStore.Get(name)
if err != nil {
return nil, errors.NewInternalError(err)
Expand Down Expand Up @@ -89,6 +89,6 @@ func (r *REST) Watch(ctx context.Context, options *internalversion.ListOptions)
return r.addressGroupStore.Watch(ctx, key, label, field)
}

func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*v1.Table, error) {
func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) {
return rest.NewDefaultTableConvertor(networking.Resource("addressgroup")).ConvertToTable(ctx, obj, tableOptions)
}
6 changes: 3 additions & 3 deletions pkg/apiserver/registry/networkpolicy/appliedtogroup/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/apis/meta/internalversion"
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/apiserver/pkg/registry/rest"
Expand Down Expand Up @@ -57,7 +57,7 @@ func (r *REST) NewList() runtime.Object {
return &networking.AppliedToGroupList{}
}

func (r *REST) Get(ctx context.Context, name string, options *v1.GetOptions) (runtime.Object, error) {
func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
appliedToGroup, exists, err := r.appliedToGroupStore.Get(name)
if err != nil {
return nil, errors.NewInternalError(err)
Expand Down Expand Up @@ -89,6 +89,6 @@ func (r *REST) Watch(ctx context.Context, options *internalversion.ListOptions)
return r.appliedToGroupStore.Watch(ctx, key, label, field)
}

func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*v1.Table, error) {
func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) {
return rest.NewDefaultTableConvertor(networking.Resource("appliedtogroup")).ConvertToTable(ctx, obj, tableOptions)
}
6 changes: 3 additions & 3 deletions pkg/apiserver/registry/networkpolicy/networkpolicy/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/apis/meta/internalversion"
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/apiserver/pkg/endpoints/request"
Expand Down Expand Up @@ -59,7 +59,7 @@ func (r *REST) NewList() runtime.Object {
return &networking.NetworkPolicyList{}
}

func (r *REST) Get(ctx context.Context, name string, options *v1.GetOptions) (runtime.Object, error) {
func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
ns, ok := request.NamespaceFrom(ctx)
if !ok || len(ns) == 0 {
return nil, errors.NewBadRequest("Namespace parameter required.")
Expand Down Expand Up @@ -107,6 +107,6 @@ func (r *REST) Watch(ctx context.Context, options *internalversion.ListOptions)
return r.networkPolicyStore.Watch(ctx, key, label, field)
}

func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*v1.Table, error) {
func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) {
return rest.NewDefaultTableConvertor(networking.Resource("networkpolicy")).ConvertToTable(ctx, obj, tableOptions)
}
6 changes: 3 additions & 3 deletions pkg/apiserver/registry/system/controllerinfo/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/apis/meta/internalversion"
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apiserver/pkg/registry/rest"

Expand Down Expand Up @@ -59,7 +59,7 @@ func (r *REST) getControllerInfo() *clusterinfo.AntreaControllerInfo {
return info
}

func (r *REST) Get(ctx context.Context, name string, options *v1.GetOptions) (runtime.Object, error) {
func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
info := r.getControllerInfo()
// The provided name should match the AntreaControllerInfo.Name.
if info.Name != name {
Expand All @@ -82,6 +82,6 @@ func (r *REST) NamespaceScoped() bool {
return false
}

func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*v1.Table, error) {
func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) {
return rest.NewDefaultTableConvertor(system.Resource("clusterinfos")).ConvertToTable(ctx, obj, tableOptions)
}
32 changes: 16 additions & 16 deletions pkg/controller/networkpolicy/networkpolicy_controller_perf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"time"

"github.com/google/uuid"
"k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
Expand All @@ -47,9 +47,9 @@ NAMESPACES PODS NETWORK-POLICIES TIME(s) MEMORY(M) EXECUTIONS E
The metrics are not accurate under the race detector, and will be skipped when testing with "-race".
*/
func TestInitXLargeScaleWithSmallNamespaces(t *testing.T) {
getObjects := func() ([]*v1.Namespace, []*networkingv1.NetworkPolicy, []*v1.Pod) {
getObjects := func() ([]*corev1.Namespace, []*networkingv1.NetworkPolicy, []*corev1.Pod) {
namespace := rand.String(8)
namespaces := []*v1.Namespace{
namespaces := []*corev1.Namespace{
{
ObjectMeta: metav1.ObjectMeta{Name: namespace, Labels: map[string]string{"app": namespace}},
},
Expand Down Expand Up @@ -99,26 +99,26 @@ func TestInitXLargeScaleWithSmallNamespaces(t *testing.T) {
},
},
}
pods := []*v1.Pod{
pods := []*corev1.Pod{
{
ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: "pod1", UID: types.UID(uuid.New().String()), Labels: map[string]string{"app-1": "scale-1"}},
Spec: v1.PodSpec{NodeName: getRandomNodeName()},
Status: v1.PodStatus{PodIP: getRandomIP()},
Spec: corev1.PodSpec{NodeName: getRandomNodeName()},
Status: corev1.PodStatus{PodIP: getRandomIP()},
},
{
ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: "pod2", UID: types.UID(uuid.New().String()), Labels: map[string]string{"app-1": "scale-1"}},
Spec: v1.PodSpec{NodeName: getRandomNodeName()},
Status: v1.PodStatus{PodIP: getRandomIP()},
Spec: corev1.PodSpec{NodeName: getRandomNodeName()},
Status: corev1.PodStatus{PodIP: getRandomIP()},
},
{
ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: "pod3", UID: types.UID(uuid.New().String()), Labels: map[string]string{"app-2": "scale-2"}},
Spec: v1.PodSpec{NodeName: getRandomNodeName()},
Status: v1.PodStatus{PodIP: getRandomIP()},
Spec: corev1.PodSpec{NodeName: getRandomNodeName()},
Status: corev1.PodStatus{PodIP: getRandomIP()},
},
{
ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: "pod4", UID: types.UID(uuid.New().String()), Labels: map[string]string{"app-2": "scale-2"}},
Spec: v1.PodSpec{NodeName: getRandomNodeName()},
Status: v1.PodStatus{PodIP: getRandomIP()},
Spec: corev1.PodSpec{NodeName: getRandomNodeName()},
Status: corev1.PodStatus{PodIP: getRandomIP()},
},
}
return namespaces, networkPolicies, pods
Expand All @@ -127,7 +127,7 @@ func TestInitXLargeScaleWithSmallNamespaces(t *testing.T) {
testComputeNetworkPolicy(t, 10*time.Second, namespaces, networkPolicies, pods)
}

func testComputeNetworkPolicy(t *testing.T, maxExecutionTime time.Duration, namespaces []*v1.Namespace, networkPolicies []*networkingv1.NetworkPolicy, pods []*v1.Pod) {
func testComputeNetworkPolicy(t *testing.T, maxExecutionTime time.Duration, namespaces []*corev1.Namespace, networkPolicies []*networkingv1.NetworkPolicy, pods []*corev1.Pod) {
objs := make([]runtime.Object, 0, len(namespaces)+len(networkPolicies)+len(pods))
for i := range namespaces {
objs = append(objs, namespaces[i])
Expand Down Expand Up @@ -264,10 +264,10 @@ func getRandomNodeName() string {
}

// getXObjects calls the provided getObjectsFunc x times and aggregate the objects.
func getXObjects(x int, getObjectsFunc func() ([]*v1.Namespace, []*networkingv1.NetworkPolicy, []*v1.Pod)) ([]*v1.Namespace, []*networkingv1.NetworkPolicy, []*v1.Pod) {
var namespaces []*v1.Namespace
func getXObjects(x int, getObjectsFunc func() ([]*corev1.Namespace, []*networkingv1.NetworkPolicy, []*corev1.Pod)) ([]*corev1.Namespace, []*networkingv1.NetworkPolicy, []*corev1.Pod) {
var namespaces []*corev1.Namespace
var networkPolicies []*networkingv1.NetworkPolicy
var pods []*v1.Pod
var pods []*corev1.Pod
for i := 0; i < x; i++ {
newNamespaces, newNetworkPolicies, newPods := getObjectsFunc()
namespaces = append(namespaces, newNamespaces...)
Expand Down
8 changes: 4 additions & 4 deletions pkg/controller/traceflow/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sync"
"time"

"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
Expand Down Expand Up @@ -236,7 +236,7 @@ func (c *Controller) checkTraceflowStatus(tf *opsv1alpha1.Traceflow) (retry bool
}
if sender && receiver {
tf.Status.Phase = opsv1alpha1.Succeeded
_, err = c.client.OpsV1alpha1().Traceflows().UpdateStatus(context.TODO(), tf, v1.UpdateOptions{})
_, err = c.client.OpsV1alpha1().Traceflows().UpdateStatus(context.TODO(), tf, metav1.UpdateOptions{})
return
}
if time.Now().UTC().Sub(tf.CreationTimestamp.UTC()).Seconds() > timeout {
Expand All @@ -256,7 +256,7 @@ func (c *Controller) runningTraceflowCRD(tf *opsv1alpha1.Traceflow, dataPlaneTag
}
patchData := Traceflow{Status: opsv1alpha1.TraceflowStatus{Phase: tf.Status.Phase, DataplaneTag: dataPlaneTag}}
payloads, _ := json.Marshal(patchData)
return c.client.OpsV1alpha1().Traceflows().Patch(context.TODO(), tf.Name, types.MergePatchType, payloads, v1.PatchOptions{}, "status")
return c.client.OpsV1alpha1().Traceflows().Patch(context.TODO(), tf.Name, types.MergePatchType, payloads, metav1.PatchOptions{}, "status")
}

func (c *Controller) errorTraceflowCRD(tf *opsv1alpha1.Traceflow, reason string) (*opsv1alpha1.Traceflow, error) {
Expand All @@ -267,7 +267,7 @@ func (c *Controller) errorTraceflowCRD(tf *opsv1alpha1.Traceflow, reason string)
}
patchData := Traceflow{Status: opsv1alpha1.TraceflowStatus{Phase: tf.Status.Phase, Reason: reason}}
payloads, _ := json.Marshal(patchData)
return c.client.OpsV1alpha1().Traceflows().Patch(context.TODO(), tf.Name, types.MergePatchType, payloads, v1.PatchOptions{}, "status")
return c.client.OpsV1alpha1().Traceflows().Patch(context.TODO(), tf.Name, types.MergePatchType, payloads, metav1.PatchOptions{}, "status")
}

func (c *Controller) occupyTag(tf *opsv1alpha1.Traceflow) error {
Expand Down
Loading

0 comments on commit 74055d7

Please sign in to comment.