Skip to content

Commit

Permalink
workaround DeepDerivative CreationTimestamp comparison (#893)
Browse files Browse the repository at this point in the history
Co-authored-by: Marek Schmidt <maschmid@redhat.com>
  • Loading branch information
openshift-cherrypick-robot and maschmid authored Oct 8, 2024
1 parent 6dd3ae3 commit 8542448
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 8542448

Please sign in to comment.