Skip to content

Commit

Permalink
Update Knative 1.4 (kubeflow#2231)
Browse files Browse the repository at this point in the history
* knative: Update README for v1.4.0

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative: wget latest manifests

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative: Remove all comments

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative: Remove knative-ingress-gateway

Had to manually remove a `{}` object at the end, introduced by the yq
command.

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative: Update README for removing {}

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative: Set metadata.name in post-install-job

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative-eventing: Update with v1.4.0 manifests

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative-eventing: Remove comments

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative-eventing: Remove anchors

Signed-off-by: Kimonas Sotirchos <[email protected]>

* knative-eventing: Install only core

Signed-off-by: Kimonas Sotirchos <[email protected]>
  • Loading branch information
kimwnasptd authored and kevin85421 committed Feb 28, 2023
1 parent c7be374 commit cf8f55e
Show file tree
Hide file tree
Showing 9 changed files with 7,260 additions and 5,042 deletions.
30 changes: 16 additions & 14 deletions common/knative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

The manifests for Knative Serving are based off the following:

- [Knative serving (v0.22.1)](https://github.com/knative/serving/releases/download/v0.22.1/serving-core.yaml)
- [Knative ingress controller for Istio (v0.22.1)](https://github.com/knative-sandbox/net-istio/releases/download/v0.22.1/net-istio.yaml)
- [Knative serving (v1.4.0)](https://github.com/knative/serving/releases/download/v0.22.1/serving-core.yaml)
- [Knative ingress controller for Istio (v1.4.0)](https://github.com/knative-sandbox/net-istio/releases/download/v0.22.1/net-istio.yaml)


1. Download the knative-serving manifests with the following commands:

```sh
# No need to install serving-crds.
# See: https://github.com/knative/serving/issues/9945
wget -O knative-serving/base/upstream/serving-core.yaml 'https://github.com/knative/serving/releases/download/v0.22.1/serving-core.yaml'
wget -O knative-serving/base/upstream/net-istio.yaml 'https://github.com/knative-sandbox/net-istio/releases/download/v0.22.1/net-istio.yaml'
wget -O knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml https://github.com/knative/serving/releases/download/v0.22.1/serving-post-install-jobs.yaml
wget -O knative-serving/base/upstream/serving-core.yaml 'https://github.com/knative/serving/releases/download/knative-v1.4.0/serving-core.yaml'
wget -O knative-serving/base/upstream/net-istio.yaml 'https://github.com/knative-sandbox/net-istio/releases/download/knative-v1.4.0/net-istio.yaml'
wget -O knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml https://github.com/knative/serving/releases/download/knative-v1.4.0/serving-post-install-jobs.yaml
```

1. Remove all comments, since `yq` does not handle them correctly. See:
Expand Down Expand Up @@ -46,6 +46,8 @@ The manifests for Knative Serving are based off the following:
yq eval -i 'select((.kind == "Gateway" and .metadata.name == "knative-ingress-gateway") | not)' knative-serving/base/upstream/net-istio.yaml
```

NOTE: You'll need to remove a redundant `{}` at the end of the `knative-serving/base/upstream/net-istio.yaml` file.
1. Set `metadata.name` in the serving post-install job, to be deploy-able with
`kustomize` and `kubectl apply`:
Expand All @@ -67,20 +69,20 @@ The manifests for Knative Serving are based off the following:
## Knative-Eventing
The manifests for Knative Eventing are based off the the [v0.22.1 release](https://github.com/knative/eventing/releases/tag/v0.22.1).
The manifests for Knative Eventing are based off the the [v1.4.0 release](https://github.com/knative/eventing/releases/tag/v0.22.1).
- [Eventing Core](https://github.com/knative/eventing/releases/download/v0.22.1/eventing-core.yaml)
- [In-Memory Channel](https://github.com/knative/eventing/releases/download/v0.22.1/in-memory-channel.yaml)
- [MT Channel Broker](https://github.com/knative/eventing/releases/download/v0.22.1/mt-channel-broker.yaml)
- [Eventing Core](https://github.com/knative/eventing/releases/download/v1.4.0/eventing-core.yaml)
- [In-Memory Channel](https://github.com/knative/eventing/releases/download/v1.4.0/in-memory-channel.yaml)
- [MT Channel Broker](https://github.com/knative/eventing/releases/download/v1.4.0/mt-channel-broker.yaml)
1. Download the knative-serving manifests with the following commands:
1. Download the knative-eventing manifests with the following commands:
```sh
wget -O knative-eventing/base/upstream/eventing-core.yaml 'https://github.com/knative/eventing/releases/download/v0.22.1/eventing-core.yaml'
wget -O knative-eventing/base/upstream/in-memory-channel.yaml 'https://github.com/knative/eventing/releases/download/v0.22.1/in-memory-channel.yaml'
wget -O knative-eventing/base/upstream/mt-channel-broker.yaml 'https://github.com/knative/eventing/releases/download/v0.22.1/mt-channel-broker.yaml'
wget -O knative-eventing-post-install-jobs/base/eventing-post-install-jobs.yaml https://github.com/knative/eventing/releases/download/v0.22.1/eventing-post-install-jobs.yaml
wget -O knative-eventing/base/upstream/eventing-core.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.4.0/eventing-core.yaml'
wget -O knative-eventing/base/upstream/in-memory-channel.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.4.0/in-memory-channel.yaml'
wget -O knative-eventing/base/upstream/mt-channel-broker.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.4.0/mt-channel-broker.yaml'
wget -O knative-eventing-post-install-jobs/base/eventing-post-install-jobs.yaml https://github.com/knative/eventing/releases/download/knative-v1.4.0/eventing-post-install-jobs.yaml
```
1. Remove all comments, since `yq` does not handle them correctly. See:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,114 +1 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: knative-eventing-post-install-job-role
labels:
eventing.knative.dev/release: "v0.22.1"
rules:
- apiGroups:
- "apiextensions.k8s.io"
resources:
- "customresourcedefinitions"
- "customresourcedefinitions/status"
verbs:
- "get"
- "list"
- "update"
- "patch"
- "watch"
- apiGroups:
- "sources.knative.dev"
resources:
- "pingsources"
verbs:
- "get"
- "list"
- "create"
- "update"
- "delete"
- "patch"
- "watch"
- apiGroups:
- ""
resources:
- "namespaces"
verbs:
- "get"
- "list"
---
apiVersion: batch/v1
kind: Job
metadata:
name: v0.22.0-pingsource-cleanup
namespace: knative-eventing
labels:
eventing.knative.dev/release: "v0.22.1"
spec:
ttlSecondsAfterFinished: 600
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
spec:
serviceAccountName: knative-eventing-post-install-job
restartPolicy: Never
containers:
- name: pingsource
image: gcr.io/knative-releases/knative.dev/eventing/cmd/v0.22/pingsource-cleanup@sha256:837b8d5cfe38afa297d25e7aed30ec8df80f721a084d4fdcc614d65afde4c528
env:
- name: SYSTEM_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: knative-eventing-post-install-job
namespace: knative-eventing
labels:
eventing.knative.dev/release: "v0.22.1"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: knative-eventing-post-install-job-role-binding
labels:
eventing.knative.dev/release: "v0.22.1"
subjects:
- kind: ServiceAccount
name: knative-eventing-post-install-job
namespace: knative-eventing
roleRef:
kind: ClusterRole
name: knative-eventing-post-install-job-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: batch/v1
kind: Job
metadata:
name: v0.21-storage-version-migration
namespace: knative-eventing
labels:
app: "storage-version-migration"
eventing.knative.dev/release: "v0.22.1"
spec:
ttlSecondsAfterFinished: 600
backoffLimit: 10
template:
metadata:
labels:
app: "storage-version-migration"
eventing.knative.dev/release: "v0.22.1"
annotations:
sidecar.istio.io/inject: "false"
spec:
serviceAccountName: knative-eventing-post-install-job
restartPolicy: OnFailure
containers:
- name: migrate
image: gcr.io/knative-releases/knative.dev/eventing/vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate@sha256:ef150a99d5b18781746d3934f181a766b27a975cb7593d9283fbd040e9ebfe5b
args:
- "pingsources.sources.knative.dev"
---

4 changes: 2 additions & 2 deletions common/knative/knative-eventing/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ kind: Kustomization
namespace: knative-eventing
resources:
- upstream/eventing-core.yaml
- upstream/in-memory-channel.yaml
- upstream/mt-channel-broker.yaml
#- upstream/in-memory-channel.yaml
#- upstream/mt-channel-broker.yaml
patchesStrategicMerge:
- patches/clusterrole-patch.yaml
commonLabels:
Expand Down
Loading

0 comments on commit cf8f55e

Please sign in to comment.