Merge pull request #12788 from vtrenton/main

changed Itoa to Sprintf to allow int64 value preventing 2038 overflow
pull/12620/head
Matt Farina 3 months ago committed by GitHub
commit 54be5511e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -18,6 +18,7 @@ package driver // import "helm.sh/helm/v3/pkg/storage/driver"
import (
"context"
"fmt"
"strconv"
"strings"
"time"
@ -160,7 +161,7 @@ func (cfgmaps *ConfigMaps) Create(key string, rls *rspb.Release) error {
lbs.init()
lbs.fromMap(rls.Labels)
lbs.set("createdAt", strconv.Itoa(int(time.Now().Unix())))
lbs.set("createdAt", fmt.Sprintf("%v", time.Now().Unix()))
// create a new configmap to hold the release
obj, err := newConfigMapsObject(key, rls, lbs)
@ -188,7 +189,7 @@ func (cfgmaps *ConfigMaps) Update(key string, rls *rspb.Release) error {
lbs.init()
lbs.fromMap(rls.Labels)
lbs.set("modifiedAt", strconv.Itoa(int(time.Now().Unix())))
lbs.set("modifiedAt", fmt.Sprintf("%v", time.Now().Unix()))
// create a new configmap object to hold the release
obj, err := newConfigMapsObject(key, rls, lbs)

@ -18,6 +18,7 @@ package driver // import "helm.sh/helm/v3/pkg/storage/driver"
import (
"context"
"fmt"
"strconv"
"strings"
"time"
@ -151,7 +152,7 @@ func (secrets *Secrets) Create(key string, rls *rspb.Release) error {
lbs.init()
lbs.fromMap(rls.Labels)
lbs.set("createdAt", strconv.Itoa(int(time.Now().Unix())))
lbs.set("createdAt", fmt.Sprintf("%v", time.Now().Unix()))
// create a new secret to hold the release
obj, err := newSecretsObject(key, rls, lbs)
@ -177,7 +178,7 @@ func (secrets *Secrets) Update(key string, rls *rspb.Release) error {
lbs.init()
lbs.fromMap(rls.Labels)
lbs.set("modifiedAt", strconv.Itoa(int(time.Now().Unix())))
lbs.set("modifiedAt", fmt.Sprintf("%v", time.Now().Unix()))
// create a new secret object to hold the release
obj, err := newSecretsObject(key, rls, lbs)

Loading…
Cancel
Save