Skip to content

Commit

Permalink
update knative-serving instructions for kustomize v5
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Bennedsgaard <abbennedsgaard@gmail.com>
  • Loading branch information
AndersBennedsgaard committed Mar 15, 2024
1 parent d41c25d commit a3b2e8d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 17 deletions.
19 changes: 2 additions & 17 deletions common/knative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ The manifests for Knative Serving are based off the following:
yq eval -i 'explode(.)' knative-serving-post-install-jobs/base/serving-post-install-jobs.yaml
```

1. Remove the `knative-ingress-gateway` Gateway, since we use the Kubeflow
gateway. We will make this into a patch once we update kustomize to v4,
which supports removing CRs with patches. See:
https://github.com/kubernetes-sigs/kustomize/issues/3694

```sh
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 @@ -56,13 +45,9 @@ 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.
- The `knative-ingress-gateway` Gateway is removed since we use the Kubeflow gateway.
- In `config-istio`, the Knative gateway is set to use `gateway.kubeflow.kubeflow-gateway`.
- In `config-deployment`, `progressDeadline` is set to `600s` as sometimes large models need longer than
the default of `120s` to start the containers.
Expand Down Expand Up @@ -144,4 +129,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.
```
```
1 change: 1 addition & 0 deletions common/knative/knative-serving/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ patches:
- path: patches/knative-serving-namespaced-edit.yaml
- path: patches/knative-serving-namespaced-view.yaml
- path: patches/service-labels.yaml
- path: patches/remove-gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$patch: delete
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: knative-ingress-gateway
namespace: knative-serving
21 changes: 21 additions & 0 deletions common/knative/knative-serving/base/upstream/net-istio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ rules:
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: knative-ingress-gateway
namespace: knative-serving
labels:
app.kubernetes.io/component: net-istio
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: "1.10.1"
networking.knative.dev/ingress-provider: istio
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: knative-local-gateway
namespace: knative-serving
Expand Down

0 comments on commit a3b2e8d

Please sign in to comment.