fix(certificates): use a stable format for the rotate annotation value (#955)

This commit is contained in:
Pierre Gaxatte
2025-09-09 12:27:11 +02:00
committed by GitHub
parent 1b4bd884dc
commit 5d6f512df1
2 changed files with 9 additions and 7 deletions

View File

@@ -4,6 +4,8 @@
package utilities
import (
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
)
@@ -34,7 +36,7 @@ func SetLastRotationTimestamp(obj client.Object) {
annotations = map[string]string{}
}
annotations[RotateCertificateRequestAnnotation] = metav1.Now().String()
annotations[RotateCertificateRequestAnnotation] = metav1.Now().Format(time.RFC3339)
obj.SetAnnotations(annotations)
}