Skip to content

Commit

Permalink
[release-v1.14] workaround DeepDerivative CreationTimestamp comparison (
Browse files Browse the repository at this point in the history
#1305)

* workaround DeepDerivative CreationTimestamp comparison

* add patch for eventing_auth_serviceaccount_creationtimestamp.patch

* add patch to generate-release
  • Loading branch information
maschmid authored Oct 8, 2024
1 parent 9fb4274 commit 6b5eeca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/vendor/knative.dev/eventing/pkg/auth/serviceaccount.go b/vendor/knative.dev/eventing/pkg/auth/serviceaccount.go
index 5b98d61c7..12e0fe130 100644
--- a/vendor/knative.dev/eventing/pkg/auth/serviceaccount.go
+++ b/vendor/knative.dev/eventing/pkg/auth/serviceaccount.go
@@ -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

1 change: 1 addition & 0 deletions openshift/release/generate-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source $(dirname $0)/resolve.sh
GITHUB_ACTIONS=true $(dirname $0)/../../hack/update-codegen.sh
git apply openshift/patches/refactor_newfilters.patch
git apply openshift/patches/rekt-serviceaccounts-delete.patch
git apply openshift/patches/eventing_auth_serviceaccount_creationtimestamp.patch

# Eventing core will bring the config tracing ConfigMap, so remove it from heret
rm -f control-plane/config/eventing-kafka-broker/200-controller/100-config-tracing.yaml
Expand Down
3 changes: 3 additions & 0 deletions vendor/knative.dev/eventing/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 6b5eeca

Please sign in to comment.