Skip to content

Commit

Permalink
add tests with k8s v1.25
Browse files Browse the repository at this point in the history
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
  • Loading branch information
vaikas committed Sep 10, 2022
1 parent 5c9236f commit 6b18cdc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fulcio-rekor-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Setup Knative
uses: chainguard-dev/actions/setup-knative@main
with:
version: "1.6.0"
version: "latest"
serving-features: >
{
"kubernetes.podspec-fieldref": "enabled"
Expand Down
29 changes: 27 additions & 2 deletions hack/setup-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ done
sleep 5

network=$(docker network inspect kind -f "{{(index .IPAM.Config 0).Subnet}}" | cut -d '.' -f1,2)
cat <<EOF | kubectl apply -f -
cat <<EOF >>./metallb-crds.yaml
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
Expand All @@ -238,6 +238,20 @@ metadata:
namespace: metallb-system
EOF

for i in {1..10}
do
if kubectl apply -f ./metallb-crds.yaml ; then
echo successfully applied metallb crds
break
fi
if [ $i == 10 ]; then
echo failed to apply metallb crds. exiting
exit 1
fi
echo failed to apply metallb crds. Attempt numer $i, retrying
sleep 2
done

echo '::endgroup::'


Expand Down Expand Up @@ -275,8 +289,19 @@ echo '::group:: Install Knative Serving'
function resource_blaster() {
local REPO="${1}"
local FILE="${2}"
local REAL_KNATIVE_VERSION=${KNATIVE_VERSION}

# If latest specified, fetch that instead. Note that this can vary
# between versions, so have to fetch for each component.
if [ ${KNATIVE_VERSION} == "latest" ]; then
REAL_KNATIVE_VERSION=$(curl -L -s https://github.com/gitapi/repos/knative/${REPO}/releases/latest | jq -r '.tag_name')
else
REAL_KNATIVE_VERSION="knative-v${KNATIVE_VERSION}"
fi

url="https://github.com/knative/${REPO}/releases/download/${REAL_KNATIVE_VERSION}/${FILE}"

curl -L -s "https://github.com/knative/${REPO}/releases/download/knative-v${KNATIVE_VERSION}/${FILE}" \
curl -L -s ${url} \
| yq e 'del(.spec.template.spec.containers[]?.resources)' - \
`# Filter out empty objects that come out as {} b/c kubectl barfs` \
| grep -v '^{}$'
Expand Down

0 comments on commit 6b18cdc

Please sign in to comment.