Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for invalidSince (0.14 sec)

  1. pkg/controller/serviceaccount/legacy_serviceaccount_token_cleaner.go

    			// still used by pods
    			continue
    		}
    
    		invalidSince := secret.Labels[serviceaccount.InvalidSinceLabelKey]
    		// If the secret has not been labeled with invalid since date or the label value has invalid format, update the invalidSince label with the current date value.
    		_, err = time.Parse(dateFormat, invalidSince)
    		if err != nil {
    			invalidSince = now.Format(dateFormat)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 03:52:06 UTC 2023
    - 10K bytes
    - Viewed (0)
  2. pkg/serviceaccount/legacy.go

    		}
    
    		// Track secret-based long-lived service account tokens and add audit annotations and metrics.
    		autoGenerated := false
    
    		// Check if the secret has been marked as invalid
    		if invalidSince := secret.Labels[InvalidSinceLabelKey]; invalidSince != "" {
    			audit.AddAuditAnnotation(ctx, "authentication.k8s.io/legacy-token-invalidated", secret.Name+"/"+secret.Namespace)
    			invalidatedAutoTokensTotal.WithContext(ctx).Inc()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 08:32:23 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  3. pkg/controller/serviceaccount/legacy_serviceaccount_token_cleaner_test.go

    		},
    	}
    }
    
    func patchContent(namespace, name, invalidSince string, uID types.UID) []byte {
    	patch, _ := json.Marshal(applyv1.Secret(name, namespace).WithUID(uID).WithLabels(map[string]string{serviceaccount.InvalidSinceLabelKey: invalidSince}))
    	return patch
    }
    
    func TestLegacyServiceAccountTokenCleanUp(t *testing.T) {
    	testcases := map[string]struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 03:52:06 UTC 2023
    - 21.1K bytes
    - Viewed (0)
Back to top