Skip to content

Commit 8771bfa

Browse files
authored
Merge pull request #234 from joelsmith/kedamain
Sync sample CRs from main repo during releases
2 parents 4967f87 + a844ed8 commit 8771bfa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hack/relprep.sh

+10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ set -e
1313
# these components k8s.io/<item> are versioned for each k8s release and should match the version of k8s used in KEDA for a given release
1414
kube_components="api apimachinery apiextensions-apiserver apiserver client-go component-base kube-aggregator"
1515

16+
echo "Fetching sample CRs for KEDA v$ver"
17+
curl -s "https://raw.githubusercontent.com/kedacore/keda/v${ver}/config/samples/kustomization.yaml" > config/samples/kustomization.yaml
18+
for cr in $(sed -n '/^resources:$/,/^[^-]/ { s#[^0-9a-zA-Z_. -]##g; s#^- ##p}' config/samples/kustomization.yaml); do
19+
curl -s "https://raw.githubusercontent.com/kedacore/keda/v${ver}/config/samples/$cr" > "config/samples/$cr"
20+
done
21+
22+
echo "Updating list of sample CRs to include KedaControllers"
23+
# Since the above fetch of config/samples/kustomization.yaml reverts changes specific to this repo, re-add here
24+
sed -i $'/^resources:$/ a\\\n- keda_v1alpha1_kedacontroller.yaml' config/samples/kustomization.yaml
25+
1626
echo "Fetching go.mod for KEDA v$ver"
1727
keda_gomod="$(curl -s "https://raw.githubusercontent.com/kedacore/keda/v${ver}/go.mod")"
1828

0 commit comments

Comments
 (0)