Skip to content

Commit

Permalink
knative: Updrade Knative to version 1.2 (kubeflow#2251)
Browse files Browse the repository at this point in the history
* Update the README file
* Fetch the manifests for Knative serving 1.2.5
* Fetch the manifests for Knative eventing 1.2.4
* Remove comments, anchors and aliases

Signed-off-by: Dimitris Poulopoulos <dimpo@arrikto.com>
  • Loading branch information
Dimitris Poulopoulos authored Jul 14, 2022
1 parent 707f8f6 commit 0660ee0
Show file tree
Hide file tree
Showing 10 changed files with 651 additions and 1,990 deletions.
32 changes: 18 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 (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)
- [Knative serving (v1.2.5)](/~https://github.com/knative/serving/releases/download/knative-v1.2.5/serving-core.yaml)
- [Knative ingress controller for Istio (v1.2.0)](/~https://github.com/knative-sandbox/net-istio/releases/download/knative-v1.2.0/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/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
wget -O knative-serving/base/upstream/serving-core.yaml '/~https://github.com/knative/serving/releases/download/knative-v1.2.5/serving-core.yaml'
wget -O knative-serving/base/upstream/net-istio.yaml '/~https://github.com/knative-sandbox/net-istio/releases/download/knative-v1.2.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.2.5/serving-post-install-jobs.yaml
```

1. Remove all comments, since `yq` does not handle them correctly. See:
Expand Down Expand Up @@ -57,6 +57,10 @@ The manifests for Knative Serving are based off the following:
yq eval -i 'select(.kind == "Job" and .metadata.generateName == "storage-version-migration-serving-") | .metadata.name = "storage-version-migration-serving"' knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml
```
NOTE: You'll need to remove a redundant `{}` at the end of the `knative-serving/base/upstream/net-istio.yaml` and
`knative-serving/base/upstream/serving-core.yaml` files.

### Changes from upstream

- In `knative-serving/base/upstream/net-istio.yaml`, the `knative-ingress-gateway` Gateway is removed since we use the Kubeflow gateway.
Expand All @@ -69,20 +73,20 @@ The manifests for Knative Serving are based off the following:

## Knative-Eventing

The manifests for Knative Eventing are based off the the [v1.4.0 release](/~https://github.com/knative/eventing/releases/tag/v0.22.1).
The manifests for Knative Eventing are based off the the [v1.2.4 release](/~https://github.com/knative/eventing/releases/tag/knative-v1.2.4).

- [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)
- [Eventing Core](/~https://github.com/knative/eventing/releases/download/knative-v1.2.4/eventing-core.yaml)
- [In-Memory Channel](/~https://github.com/knative/eventing/releases/download/knative-v1.2.4/in-memory-channel.yaml)
- [MT Channel Broker](/~https://github.com/knative/eventing/releases/download/knative-v1.2.4/mt-channel-broker.yaml)


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/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
wget -O knative-eventing/base/upstream/eventing-core.yaml '/~https://github.com/knative/eventing/releases/download/knative-v1.2.4/eventing-core.yaml'
wget -O knative-eventing/base/upstream/in-memory-channel.yaml '/~https://github.com/knative/eventing/releases/download/knative-v1.2.4/in-memory-channel.yaml'
wget -O knative-eventing/base/upstream/mt-channel-broker.yaml '/~https://github.com/knative/eventing/releases/download/knative-v1.2.4/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.2.4/eventing-post-install.yaml
```

1. Remove all comments, since `yq` does not handle them correctly. See:
Expand Down Expand Up @@ -126,4 +130,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
```
Original file line number Diff line number Diff line change
@@ -1 +1,171 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: knative-eventing-post-install-job-role
labels:
eventing.knative.dev/release: "v1.2.4"
rules:
- apiGroups:
- "apiextensions.k8s.io"
resources:
- "customresourcedefinitions"
- "customresourcedefinitions/status"
verbs:
- "get"
- "list"
- "update"
- "patch"
- "watch"
- apiGroups:
- "sources.knative.dev"
resources:
- "apiserversources"
- "apiserversources/finalizers"
- "apiserversources/status"
- "containersources"
- "containersources/finalizers"
- "containersources/status"
- "pingsources"
- "pingsources/finalizers"
- "pingsources/status"
- "sinkbindings"
- "sinkbindings/finalizers"
- "sinkbindings/status"
verbs:
- "get"
- "list"
- "create"
- "update"
- "patch"
- "watch"
- apiGroups:
- "eventing.knative.dev"
resources:
- "brokers"
- "brokers/finalizers"
- "brokers/status"
- "eventtypes"
- "eventtypes/finalizers"
- "eventtypes/status"
- "triggers"
- "triggers/finalizers"
- "triggers/status"
verbs:
- "get"
- "list"
- "create"
- "update"
- "patch"
- "watch"
- apiGroups:
- "messaging.knative.dev"
resources:
- "channels"
- "channels/finalizers"
- "channels/status"
- "inmemorychannels"
- "inmemorychannels/finalizers"
- "inmemorychannels/status"
- "subscriptions"
- "subscriptions/finalizers"
- "subscriptions/status"
verbs:
- "get"
- "list"
- "create"
- "update"
- "patch"
- "watch"
- apiGroups:
- "flows.knative.dev"
resources:
- "parallels"
- "parallels/finalizers"
- "parallels/status"
- "sequences"
- "sequences/finalizers"
- "sequences/status"
verbs:
- "get"
- "list"
- "create"
- "update"
- "patch"
- "watch"
- apiGroups:
- ""
resources:
- "namespaces"
verbs:
- "get"
- "list"
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: knative-eventing-post-install-job
namespace: knative-eventing
labels:
eventing.knative.dev/release: "v1.2.4"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: knative-eventing-post-install-job-role-binding
labels:
eventing.knative.dev/release: "v1.2.4"
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:
generateName: storage-version-migration-eventing-
namespace: knative-eventing
labels:
app: "storage-version-migration-eventing"
eventing.knative.dev/release: "v1.2.4"
spec:
ttlSecondsAfterFinished: 600
backoffLimit: 10
template:
metadata:
labels:
app: "storage-version-migration-eventing"
eventing.knative.dev/release: "v1.2.4"
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:ce1cf40c3e58fb437bac1731aa4dd3bda63bcedeaaf303b928963071192f82bf
args:
- "apiserversources.sources.knative.dev"
- "brokers.eventing.knative.dev"
- "channels.messaging.knative.dev"
- "containersources.sources.knative.dev"
- "eventtypes.eventing.knative.dev"
- "inmemorychannels.messaging.knative.dev"
- "parallels.flows.knative.dev"
- "pingsources.sources.knative.dev"
- "sequences.flows.knative.dev"
- "sinkbindings.sources.knative.dev"
- "subscriptions.messaging.knative.dev"
- "triggers.eventing.knative.dev"
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop:
- all
---

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 0660ee0

Please sign in to comment.