Skip to content

Commit

Permalink
workaround DeepDerivative CreationTimestamp comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
maschmid committed Oct 7, 2024
1 parent b27a7c6 commit 3b3cefc
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 3b3cefc

Please sign in to comment.