Skip to content

Commit

Permalink
workaround DeepDerivative CreationTimestamp comparison (#896)
Browse files Browse the repository at this point in the history
Co-authored-by: Marek Schmidt <[email protected]>
  • Loading branch information
openshift-cherrypick-robot and maschmid authored Oct 8, 2024
1 parent 8b1fc5d commit ea4dae8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/auth/serviceaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ func EnsureOIDCServiceAccountExistsForResource(ctx context.Context, serviceAccou
return fmt.Errorf("service account %s not owned by %s %s", sa.Name, gvk.Kind, objectMeta.Name)
}

// DeepDerivative does not understand default metav1.Time{} as an empty value
expected.CreationTimestamp = sa.CreationTimestamp

if !equality.Semantic.DeepDerivative(expected, sa) {
expected.ResourceVersion = sa.ResourceVersion

Expand Down

0 comments on commit ea4dae8

Please sign in to comment.