Skip to content

Commit

Permalink
replace deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlettperry committed Aug 3, 2023
1 parent 805cd2b commit 9cf1dcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/service/k8s/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

k8sapiv1 "github.com/lyft/clutch/backend/api/k8s/v1"
)
Expand Down Expand Up @@ -43,7 +43,7 @@ func (s *svc) GetPodLogs(ctx context.Context, clientset, cluster, namespace, nam
return nil, err
}

k8sOpts.LimitBytes = pointer.Int64(limitBytes)
k8sOpts.LimitBytes = ptr.To(int64(limitBytes))
req := cs.CoreV1().Pods(cs.Namespace()).GetLogs(name, k8sOpts)
if req == nil {
return nil, fmt.Errorf("an unknown error occurred when constructing the GetLogs request")
Expand Down Expand Up @@ -112,7 +112,7 @@ func protoOptsToK8sOpts(in *k8sapiv1.PodLogsOptions) (*v1.PodLogOptions, error)
ret.Previous = in.Previous

if in.TailNumLines != 0 {
ret.TailLines = pointer.Int64(in.TailNumLines)
ret.TailLines = ptr.To(in.TailNumLines)
}
if in.SinceTs != "" {
ts, err := time.Parse(rfc3339NanoFixed, in.SinceTs)
Expand Down

0 comments on commit 9cf1dcf

Please sign in to comment.