Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop custom tigera operator patches #3

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions tests/integration/test_calico.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@

def get_image_platform():
arch = platform.machine()
match arch:
case "x86_64":
return "amd64"
case "aarch64":
return "arm64"
case _:
raise Exception(f"Unsupported cpu platform: {arch}")
if arch == "x86_64":
return "amd64"
elif arch == "aarch64":
return "arm64"
raise Exception(f"Unsupported cpu platform: {arch}")


IMG_PLATFORM = get_image_platform()
Expand All @@ -45,7 +43,8 @@ def get_image_platform():
def get_installation_spec(registry, repo):
return f"""
# This section includes base Calico installation configuration.
# For more information, see: https://docs.tigera.io/calico/latest/reference/installation/api#operator.tigera.io/v1.Installation
# For more information, see:
# https://docs.tigera.io/calico/latest/reference/installation/api#operator.tigera.io/v1.Installation
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
Expand Down Expand Up @@ -92,7 +91,6 @@ def get_imageset_spec(operator_version, calico_version):
"calico-kube-controllers",
"calico-csi",
"calico-apiserver",
"calico-ctl",
"calico-pod2daemon-flexvol",
"calico-key-cert-provisioner",
"calico-node-driver-registrar",
Expand All @@ -105,11 +103,14 @@ def get_imageset_spec(operator_version, calico_version):
image, version, IMG_PLATFORM
)
sha256_digest = get_image_sha256_digest(rock.image)
prefix = rock.image.split("/")[1]

# We're supposed to pass the original image names and new hashes.
orig_image = image.replace("calico-tigera-", "tigera/")
orig_image = orig_image.replace("calico-", "calico/")

spec["spec"]["images"].append(
{
"image": f"{prefix}/{image}",
"image": orig_image,
"digest": sha256_digest,
}
)
Expand Down
12 changes: 5 additions & 7 deletions tests/sanity/test_calico.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@

def get_image_platform():
arch = platform.machine()
match arch:
case "x86_64":
return "amd64"
case "aarch64":
return "arm64"
case _:
raise Exception(f"Unsupported cpu platform: {arch}")
if arch == "x86_64":
return "amd64"
elif arch == "aarch64":
return "arm64"
raise Exception(f"Unsupported cpu platform: {arch}")


IMG_PLATFORM = get_image_platform()
Expand Down
38 changes: 0 additions & 38 deletions tigera-operator/v1.34.0/fix_image_component_handling.patch

This file was deleted.

30 changes: 0 additions & 30 deletions tigera-operator/v1.34.0/fix_imageset_checks.patch

This file was deleted.

2 changes: 0 additions & 2 deletions tigera-operator/v1.34.0/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ parts:
- PACKAGE_NAME: github.com/tigera/operator
override-build: |
export EMAIL=root@localhost
git am --ignore-whitespace $CRAFT_PROJECT_DIR/fix_image_component_handling.patch
git am --ignore-whitespace $CRAFT_PROJECT_DIR/fix_imageset_checks.patch

LDFLAGS="-X ${PACKAGE_NAME}/version.VERSION=${GIT_VERSION} -s -w"

Expand Down
Loading