Skip to content

Commit

Permalink
wip: reapply tigera operator workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
petrutlucian94 committed Dec 5, 2024
1 parent 0ea99fb commit 93997df
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tigera-operator/v1.34.0/fix_imageset_checks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From d358aa98f1c82171af5afe815909a6d8ade0168a Mon Sep 17 00:00:00 2001
From: Lucian Petrut <[email protected]>
Date: Thu, 12 Sep 2024 13:58:24 +0000
Subject: [PATCH] quick hack: disable image set check

Calico currently checks if the image set that it received matches
the upstream images, which prevents us from using custom images.

This quick hack will just ignore unknown images. However, we should
use the Installation spec to parse the images, just like GetReference
does.
---
pkg/controller/utils/imageset/imageset.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/controller/utils/imageset/imageset.go b/pkg/controller/utils/imageset/imageset.go
index a825ddb9..b21aa693 100644
--- a/pkg/controller/utils/imageset/imageset.go
+++ b/pkg/controller/utils/imageset/imageset.go
@@ -122,7 +122,7 @@ func ValidateImageSet(is *operator.ImageSet) error {
}
}

- if len(unknownImages) == 0 && len(invalidDigests) == 0 {
+ if len(invalidDigests) == 0 {
return nil
}

--
2.43.0
1 change: 1 addition & 0 deletions tigera-operator/v1.34.0/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ parts:
- PACKAGE_NAME: github.com/tigera/operator
override-build: |
export EMAIL=root@localhost
git am --ignore-whitespace $CRAFT_PROJECT_DIR/fix_imageset_checks.patch
LDFLAGS="-X ${PACKAGE_NAME}/version.VERSION=${GIT_VERSION} -s -w"
Expand Down

0 comments on commit 93997df

Please sign in to comment.