6.9 KiB
Knative
Knative-Serving
The manifests for Knative Serving are based off the following:
-
Download the knative-serving manifests with the following commands:
# 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.12.4/serving-core.yaml' wget -O knative-serving/base/upstream/net-istio.yaml 'https://github.com/knative-extensions/net-istio/releases/download/knative-v1.12.3/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.12.4/serving-post-install-jobs.yaml' -
Remove all comments, since
yqdoes not handle them correctly. See: https://github.com/mikefarah/yq/issues/788yq eval -i '... comments=""' knative-serving/base/upstream/serving-core.yaml yq eval -i '... comments=""' knative-serving/base/upstream/net-istio.yaml yq eval -i '... comments=""' knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml -
Remove all YAML anchors and aliases, as kustomize does not support them. See: https://github.com/kubernetes-sigs/kustomize/issues/3614 https://github.com/kubernetes-sigs/kustomize/issues/3446
yq eval -i 'explode(.)' knative-serving/base/upstream/serving-core.yaml yq eval -i 'explode(.)' knative-serving/base/upstream/net-istio.yaml yq eval -i 'explode(.)' knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml -
Set
metadata.namein the serving post-install job, to be deploy-able withkustomizeandkubectl apply:# We are not using the '|=' operator because it generates an empty object # ({}) which crashes kustomize. 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
Changes from upstream
- The
knative-ingress-gatewayGateway is removed since we use the Kubeflow gateway. - In
config-istio, the Knative gateway is set to usegateway.kubeflow.kubeflow-gateway. - In
config-deployment,progressDeadlineis set to600sas sometimes large models need longer than the default of120sto start the containers.
Knative-Eventing
The manifests for Knative Eventing are based off the v1.12.6 release.
-
Download the knative-eventing manifests with the following commands:
wget -O knative-eventing/base/upstream/eventing-core.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.12.6/eventing-core.yaml' wget -O knative-eventing/base/upstream/in-memory-channel.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.12.6/in-memory-channel.yaml' wget -O knative-eventing/base/upstream/mt-channel-broker.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.12.6/mt-channel-broker.yaml' wget -O knative-eventing-post-install-jobs/base/eventing-post-install.yaml 'https://github.com/knative/eventing/releases/download/knative-v1.12.6/eventing-post-install.yaml' -
Remove all comments, since
yqdoes not handle them correctly. See: https://github.com/mikefarah/yq/issues/788yq eval -i '... comments=""' knative-eventing/base/upstream/eventing-core.yaml yq eval -i '... comments=""' knative-eventing/base/upstream/in-memory-channel.yaml yq eval -i '... comments=""' knative-eventing/base/upstream/mt-channel-broker.yaml yq eval -i '... comments=""' knative-eventing-post-install-jobs/base/eventing-post-install.yaml -
Remove all YAML anchors and aliases, as kustomize does not support them. See: https://github.com/kubernetes-sigs/kustomize/issues/3614 https://github.com/kubernetes-sigs/kustomize/issues/3446
yq eval -i 'explode(.)' knative-eventing/base/upstream/eventing-core.yaml yq eval -i 'explode(.)' knative-eventing/base/upstream/in-memory-channel.yaml yq eval -i 'explode(.)' knative-eventing/base/upstream/mt-channel-broker.yaml yq eval -i 'explode(.)' knative-eventing-post-install-jobs/base/eventing-post-install.yaml -
Set
metadata.namein the eventing post-install job, to be deploy-able withkustomizeandkubectl apply:# We are not using the '|=' operator because it generates an empty object # ({}) which crashes kustomize. yq eval -i 'select(.kind == "Job" and .metadata.generateName == "storage-version-migration-eventing-") | .metadata.name = "storage-version-migration-eventing"' knative-eventing-post-install-jobs/base/eventing-post-install.yaml -
Remove the
config-observabilityandconfig-tracingConfigMaps resource definitions from the In-Memory Channel, as they are already defined in eventing core.yq eval -i 'select((.kind == "ConfigMap" and .metadata.name == "config-observability") | not)' knative-eventing/base/upstream/in-memory-channel.yaml yq eval -i 'select((.kind == "ConfigMap" and .metadata.name == "config-tracing") | not)' knative-eventing/base/upstream/in-memory-channel.yamlNOTE: Make sure to remove a redundant
{}at the end of theknative-eventing/base/upstream/in-memory-channel.yamlfile after running the above commands.
Copyright
The files under the folders knative-serving/base/upstream and
knative-eventing/base/upstream are downloaded from upstream Knative repos, as
we mentioned above.
Because yq does not handle comments correctly, we are removing comments from
the downloaded manifests. For this reason, we include the copyright comment
here verbatim, as it appears in the original files:
Copyright 2018 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
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.