-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch to remove reliance on podman run
- Loading branch information
1 parent
6aafd28
commit f9ce315
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
base/tekton.dev/repositories/container-storage/operator/remove-reliance-on-podman-run.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From 36cb856c45b2bed5185f12c5233d05f66c1ffae8 Mon Sep 17 00:00:00 2001 | ||
From: Zed Spencer-Milnes <zed@ziax.com> | ||
Date: Fri, 1 Mar 2024 00:28:27 +0000 | ||
Subject: [PATCH] Prefer create and cp over cat and ls manipulation | ||
|
||
--- | ||
hack/source-manifests.sh | 27 +++++++++++++-------------- | ||
1 file changed, 13 insertions(+), 14 deletions(-) | ||
|
||
diff --git a/hack/source-manifests.sh b/hack/source-manifests.sh | ||
index 8b3b86aeb2..4736a0fb48 100755 | ||
--- a/hack/source-manifests.sh | ||
+++ b/hack/source-manifests.sh | ||
@@ -33,22 +33,21 @@ function dump_rook_csv() { | ||
rook_crds_dir=$rook_template_dir/ceph | ||
rook_crds_outdir="$OUTDIR_CRDS/rook" | ||
rm -rf $ROOK_CSV | ||
- rm -rf $rook_crds_outdir | ||
mkdir -p $rook_crds_outdir | ||
+ # The actual folder will be created by the cp below but we don't want the folder to exist | ||
+ rm -rf $rook_crds_outdir | ||
+ | ||
+ tmp_dir=$(mktemp -d) | ||
+ tmp_container="rook-$(date +%S%N)" | ||
|
||
- crd_list=$(mktemp) | ||
- echo "Dumping rook csv using command: $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=cat $ROOK_IMAGE $rook_template_dir/$rook_csv_template" | ||
- $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=cat "$ROOK_IMAGE" $rook_template_dir/$rook_csv_template > $ROOK_CSV | ||
- echo "Listing rook crds using command: $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=ls $ROOK_IMAGE -1 $rook_crds_dir/" | ||
- $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=ls "$ROOK_IMAGE" -1 $rook_crds_dir/ > "$crd_list" | ||
- # shellcheck disable=SC2013 | ||
- for i in $(cat "$crd_list"); do | ||
- # shellcheck disable=SC2059 | ||
- crd_file=$(printf ${rook_crds_dir}/"$i" | tr -d '[:space:]') | ||
- echo "Dumping rook crd $crd_file using command: $IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=cat $ROOK_IMAGE $crd_file" | ||
- ($IMAGE_RUN_CMD --platform=linux/amd64 --entrypoint=cat "$ROOK_IMAGE" "$crd_file") > $rook_crds_outdir/"$(basename "$crd_file")" | ||
- done; | ||
- rm -f "$crd_list" | ||
+ echo "Creating rook image to play with using command: $IMAGE_BUILD_CMD create --name=$tmp_container $ROOK_IMAGE" | ||
+ $IMAGE_BUILD_CMD create --name=$tmp_container $ROOK_IMAGE | ||
+ echo "Dumping rook csv using command: $IMAGE_BUILD_CMD cp $tmp_container:$rook_template_dir/$rook_csv_template $ROOK_CSV" | ||
+ $IMAGE_BUILD_CMD cp $tmp_container:$rook_template_dir/$rook_csv_template $ROOK_CSV | ||
+ echo "Dumping rook crds using command: $IMAGE_BUILD_CMD cp $tmp_container:$rook_crds_dir $rook_crds_outdir" | ||
+ $IMAGE_BUILD_CMD cp $tmp_container:$rook_crds_dir $rook_crds_outdir | ||
+ echo "Cleaning up rook container with command: $IMAGE_BUILD_CMD rm $tmp_container" | ||
+ $IMAGE_BUILD_CMD rm $tmp_container | ||
} | ||
|
||
# ==== DUMP OCS YAMLS ==== |