Skip to content

Commit

Permalink
fix most kustomize v5 warnings (#2653)
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Bennedsgaard <[email protected]>
  • Loading branch information
AndersBennedsgaard authored Apr 3, 2024
1 parent 03ddeb8 commit c4ba293
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 32 deletions.
10 changes: 6 additions & 4 deletions common/cert-manager/kubeflow-issuer/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Define the self-signed issuer for Kubeflow
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
kustomize.component: cert-manager
app.kubernetes.io/component: cert-manager
app.kubernetes.io/name: cert-manager
resources:
- cluster-issuer.yaml
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/component: cert-manager
app.kubernetes.io/name: cert-manager
kustomize.component: cert-manager
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ resources:
- gateway-authorizationpolicy.yaml
- gateway.yaml

patchesStrategicMerge:
- patches/remove-pdb.yaml
patches:
- path: patches/remove-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ resources:
- gateway-authorizationpolicy.yaml
- gateway.yaml

patchesStrategicMerge:
- patches/remove-pdb.yaml
patches:
- path: patches/remove-pdb.yaml
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.
```
```
16 changes: 9 additions & 7 deletions common/knative/knative-eventing/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: knative-eventing
resources:
- upstream/eventing-core.yaml
- upstream/eventing-core.yaml
# Uncomment to install In-Memory Channels as messaging layer:
# - upstream/in-memory-channel.yaml
# Uncomment to install MT-channel-based Broker layer
# - upstream/mt-channel-broker.yaml
patchesStrategicMerge:
- patches/clusterrole-patch.yaml
commonLabels:
kustomize.component: knative
app.kubernetes.io/component: knative-eventing
app.kubernetes.io/name: knative-eventing
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/component: knative-eventing
app.kubernetes.io/name: knative-eventing
kustomize.component: knative
patches:
- path: patches/clusterrole-patch.yaml
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 c4ba293

Please sign in to comment.