Blob Blame History Raw
diff -up kubernetes-1.22.0/pkg/serviceaccount/claims.go.orig kubernetes-1.22.0/pkg/serviceaccount/claims.go
--- kubernetes-1.22.0/pkg/serviceaccount/claims.go.orig	2021-08-04 19:56:19.000000000 +0200
+++ kubernetes-1.22.0/pkg/serviceaccount/claims.go	2021-09-15 00:25:49.560879244 +0200
@@ -50,7 +50,7 @@ type kubernetes struct {
 	Svcacct   ref             `json:"serviceaccount,omitempty"`
 	Pod       *ref            `json:"pod,omitempty"`
 	Secret    *ref            `json:"secret,omitempty"`
-	WarnAfter jwt.NumericDate `json:"warnafter,omitempty"`
+	WarnAfter *jwt.NumericDate `json:"warnafter,omitempty"`
 }
 
 type ref struct {
@@ -187,7 +187,7 @@ func (v *validator) Validate(ctx context
 
 	// Check special 'warnafter' field for projected service account token transition.
 	warnafter := private.Kubernetes.WarnAfter
-	if warnafter != 0 {
+	if warnafter != nil {
 		if nowTime.After(warnafter.Time()) {
 			secondsAfterWarn := nowTime.Unix() - warnafter.Time().Unix()
 			auditInfo := fmt.Sprintf("subject: %s, seconds after warning threshold: %d", public.Subject, secondsAfterWarn)