Skip to content

Commit

Permalink
fix: Add new patch to Knative upgrade script (#1441)
Browse files Browse the repository at this point in the history
* chore: bump Knative Serving to "v1.10.2"

* fix: bump chart version
  • Loading branch information
adityajariwala authored Jun 28, 2023
1 parent 73f2404 commit 82d2ee4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion staging/knative/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: knative
version: 1.10.5
version: 1.10.6
description: "Kubernetes-based platform to build, deploy, and manage modern serverless workloads"
home: https://knative.dev/
maintainers:
Expand Down
8 changes: 4 additions & 4 deletions staging/knative/charts/eventing/crds/eventing-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1390,10 +1390,10 @@ spec:
type: string
jsonPath: ".status.conditions[?(@.type=='Ready')].reason"
- !!merge <<: *version
name: v1
served: true
storage: true
# v1 schema is identical to the v1beta2 schema
name: v1
served: true
storage: true
# v1 schema is identical to the v1beta2 schema
names:
categories:
- all
Expand Down
8 changes: 4 additions & 4 deletions staging/knative/charts/eventing/templates/eventing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2605,10 +2605,10 @@ spec:
type: string
jsonPath: ".status.conditions[?(@.type=='Ready')].reason"
- !!merge <<: *version
name: v1
served: true
storage: true
# v1 schema is identical to the v1beta2 schema
name: v1
served: true
storage: true
# v1 schema is identical to the v1beta2 schema
names:
categories:
- all
Expand Down
14 changes: 10 additions & 4 deletions staging/knative/upgrade_knative.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ curl -sSL ${SERVING_URL}/serving-crds.yaml > charts/serving/crds/serving-crds.ya
curl -sSL ${SERVING_URL}/serving-core.yaml | sed -e 's/minAvailable: 80%/maxUnavailable: 1/g' > charts/serving/templates/serving-core-1.yaml
curl -sSL ${SERVING_URL}/serving-hpa.yaml > charts/serving/templates/serving-hpa-temp.yaml

curl -sSL ${EVENTING_URL}/eventing-crds.yaml > charts/eventing/crds/eventing-crds.yaml
curl -sSL ${EVENTING_URL}/eventing.yaml | sed -e 's/minAvailable: 80%/maxUnavailable: 1/g' > charts/eventing/templates/eventing-temp.yaml
curl -sSL ${EVENTING_URL}/eventing-crds.yaml > charts/eventing/crds/eventing-crds-temp.yaml
curl -sSL ${EVENTING_URL}/eventing.yaml | sed -e 's/minAvailable: 80%/maxUnavailable: 1/g' > charts/eventing/templates/eventing-1.yaml

# Indentation patches
sed 's/ name: v1/ name: v1/g' charts/eventing/templates/eventing-1.yaml | sed -e 's/ served: true/ served: true/' | sed -e 's/ storage: true/ storage: true/g' > charts/eventing/templates/eventing-temp.yaml
sed 's/ name: v1/ name: v1/g' charts/eventing/crds/eventing-crds-temp.yaml | sed -e 's/ served: true/ served: true/' | sed -e 's/ storage: true/ storage: true/g' > charts/eventing/crds/eventing-crds.yaml

# Apply patches to fix helm linter
sed "s/${PATCH_1}/${PATCH_1_FIX}/g" charts/serving/templates/serving-core-1.yaml | sed -e "s/${PATCH_2}/${PATCH_2_FIX}/g" > charts/serving/templates/serving-core-temp.yaml
Expand All @@ -45,6 +49,8 @@ sed "s/@sha256.*/:v${EVENTING_TAG}/g" charts/eventing/templates/eventing-temp.ya
rm charts/serving/templates/serving-core-1.yaml
rm charts/serving/templates/serving-core-temp.yaml
rm charts/serving/templates/serving-hpa-temp.yaml
rm charts/eventing/crds/eventing-crds-temp.yaml
rm charts/eventing/templates/eventing-1.yaml
rm charts/eventing/templates/eventing-temp.yaml

# Bump app version
Expand All @@ -56,8 +62,8 @@ mv charts/serving/Chart.yaml.temp charts/serving/Chart.yaml
mv charts/eventing/Chart.yaml.temp charts/eventing/Chart.yaml

# Commit changes
git add .
git commit -am "chore: bump Knative Serving to \"v${SERVING_TAG}\""
git add .
git commit -am "chore: bump Knative Serving to \"v${SERVING_TAG}\""

# Finish
echo "Done upgrading knative!"
Expand Down

0 comments on commit 82d2ee4

Please sign in to comment.