Skip to content

Commit 622a008

Browse files
committed
must-gather: remove the standard pod template
We don't need two pod templates now, removing the standard pod template and the code around it. Signed-off-by: Mudit Agarwal <[email protected]>
1 parent 4fbb568 commit 622a008

File tree

2 files changed

+1
-66
lines changed

2 files changed

+1
-66
lines changed

must-gather/collection-scripts/pre-install.sh

+1-12
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,12 @@
33
ns="openshift-storage"
44

55
POD_TEMPLATE_LATEST="/templates/pod.template.latest"
6-
POD_TEMPLATE_STANDARD="/templates/pod.template.standard"
76

87
SED_DELIMITER=$(echo -en "\001");
98
safe_replace () {
109
sed "s${SED_DELIMITER}${1}${SED_DELIMITER}${2}${SED_DELIMITER}g"
1110
}
1211

13-
apply_standard_helper_pod() {
14-
< ${POD_TEMPLATE_STANDARD} safe_replace "NAMESPACE" "$1" | safe_replace "IMAGE_NAME" "$2" | safe_replace "MUST_GATHER" "$HOSTNAME" > pod_helper.yaml
15-
oc apply -f pod_helper.yaml
16-
}
17-
1812
apply_latest_helper_pod() {
1913
< ${POD_TEMPLATE_LATEST} safe_replace "NAMESPACE" "$1" | safe_replace "IMAGE_NAME" "$2" | safe_replace "MUST_GATHER" "$HOSTNAME" > pod_helper.yaml
2014
oc apply -f pod_helper.yaml
@@ -33,12 +27,7 @@ deploy(){
3327
echo "not able to find the rook's operator image. Skipping collection of ceph command output" | tee -a "${BASE_COLLECTION_PATH}"/gather-debug.log
3428
else
3529
echo "creating helper pod" | tee -a "${BASE_COLLECTION_PATH}"/gather-debug.log
36-
current_version=$(oc get csv -n "${ns}" --no-headers | awk '{print $5}' | tr -dc '0-9')
37-
if [[ $current_version -ge 460 ]]; then
38-
apply_latest_helper_pod "$ns" "$operatorImage"
39-
else
40-
apply_standard_helper_pod "$ns" "$operatorImage"
41-
fi
30+
apply_latest_helper_pod "$ns" "$operatorImage"
4231
fi
4332

4433
for node in ${nodes}; do

must-gather/templates/pod.template.standard

-54
This file was deleted.

0 commit comments

Comments
 (0)