mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-16 06:23:16 +00:00
Merge pull request #132699 from PatrickLaabs/132086-csr
chore: depr. pointer pkg replacement for the csr Kubernetes-commit: de74ab716ef1014206427622d2070482dc304cc6
This commit is contained in:
commit
660181394a
@ -39,7 +39,7 @@ import (
|
|||||||
watchtools "k8s.io/client-go/tools/watch"
|
watchtools "k8s.io/client-go/tools/watch"
|
||||||
certutil "k8s.io/client-go/util/cert"
|
certutil "k8s.io/client-go/util/cert"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
"k8s.io/utils/pointer"
|
"k8s.io/utils/ptr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RequestCertificate will either use an existing (if this process has run
|
// RequestCertificate will either use an existing (if this process has run
|
||||||
@ -102,7 +102,7 @@ func RequestCertificateWithContext(ctx context.Context, client clientset.Interfa
|
|||||||
}
|
}
|
||||||
|
|
||||||
func DurationToExpirationSeconds(duration time.Duration) *int32 {
|
func DurationToExpirationSeconds(duration time.Duration) *int32 {
|
||||||
return pointer.Int32(int32(duration / time.Second))
|
return ptr.To(int32(duration / time.Second))
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExpirationSecondsToDuration(expirationSeconds int32) time.Duration {
|
func ExpirationSecondsToDuration(expirationSeconds int32) time.Duration {
|
||||||
|
Loading…
Reference in New Issue
Block a user