Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion hack/lib/mesh_resources/smmr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ spec:
- knative-serving
- serving-tests
- serving-tests-alt
- default
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Will this not break for cases where we don't use net-istio? Or will that never be the case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it will not break for cases where we don't use net-istio.
I added default namespace here, just because it is convenient for a local test.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: webhook
labels:
app: webhook
serving.knative.dev/release: devel
networking.knative.dev/ingress-provider: istio
spec:
podSelector:
matchLabels:
app: webhook
ingress:
- {}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: istio-webhook
labels:
app: istio-webhook
serving.knative.dev/release: devel
networking.knative.dev/ingress-provider: istio
spec:
podSelector:
matchLabels:
app: istio-webhook
ingress:
- {}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: domainmapping-webhook
labels:
app: domainmapping-webhook
serving.knative.dev/release: devel
networking.knative.dev/ingress-provider: istio
spec:
podSelector:
matchLabels:
app: domainmapping-webhook
ingress:
- {}
---
51 changes: 51 additions & 0 deletions openshift-knative-operator/hack/007-webhook-servicemesh.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
diff --git a/openshift-knative-operator/cmd/operator/kodata/ingress/0.22/0-webhook-servicemesh.yaml b/openshift-knative-operator/cmd/operator/kodata/ingress/0.22/0-webhook-servicemesh.yaml
new file mode 100644
index 00000000..3d46fbed
--- /dev/null
+++ b/openshift-knative-operator/cmd/operator/kodata/ingress/0.22/0-webhook-servicemesh.yaml
@@ -0,0 +1,45 @@
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: webhook
+ labels:
+ app: webhook
+ serving.knative.dev/release: devel
+ networking.knative.dev/ingress-provider: istio
+spec:
+ podSelector:
+ matchLabels:
+ app: webhook
+ ingress:
+ - {}
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: istio-webhook
+ labels:
+ app: istio-webhook
+ serving.knative.dev/release: devel
+ networking.knative.dev/ingress-provider: istio
+spec:
+ podSelector:
+ matchLabels:
+ app: istio-webhook
+ ingress:
+ - {}
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: domainmapping-webhook
+ labels:
+ app: domainmapping-webhook
+ serving.knative.dev/release: devel
+ networking.knative.dev/ingress-provider: istio
+spec:
+ podSelector:
+ matchLabels:
+ app: domainmapping-webhook
+ ingress:
+ - {}
+---
3 changes: 3 additions & 0 deletions openshift-knative-operator/hack/update-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@ git apply "$root/openshift-knative-operator/hack/005-disable-hpa.patch"
# TODO: Remove this once upstream fixed https://github.com/knative/operator/issues/376.
# This is the eventing counterpart of SRVKS-670.
git apply "$root/openshift-knative-operator/hack/006-eventing-pdb.patch"

# Add networkpolicy for webhook when net-istio is enabled.
git apply "$root/openshift-knative-operator/hack/007-webhook-servicemesh.patch"