Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
943a07a
Install Mesh Resources for multitenancy
mgencur Jun 19, 2023
d52d6e2
Update authorization policies
mgencur Jun 28, 2023
81f7170
Update teardown for Mesh
mgencur Jun 28, 2023
3031c42
Revert "Update authorization policies"
mgencur Jun 28, 2023
f9d9daa
Test Kafka together with Mesh
mgencur Jun 28, 2023
4f828b7
Add more policies
mgencur Jun 28, 2023
43f06b8
Remove some policies
mgencur Jun 28, 2023
b99eb61
Add policies #1
mgencur Jun 28, 2023
f137f67
Add policies - allow probe
mgencur Jun 28, 2023
2422b0d
Introduce default environment for eventinge2erekt tests
mgencur Jun 28, 2023
bd53a5d
Fix lint
mgencur Jun 28, 2023
afa145f
Update readme for serving/metadata-webhook
mgencur Jun 28, 2023
fe12fbe
Add allow-serverless-tests-kafka-channel auth policy
mgencur Jun 28, 2023
d7336ef
Add deny-all-by-default policies
mgencur Jun 28, 2023
8651e8c
Allow traffic to autoscaler from activator
mgencur Jun 28, 2023
c839ca6
Use heml chart from pirDipi to generate policies
mgencur Jun 28, 2023
07fa539
Use auth policies from pierDipi's helm chart
mgencur Jun 29, 2023
9c69840
Update helm chart for serverless-tests
mgencur Jun 29, 2023
63dbd0f
Add policies for serving-tests ns for upstream tests
mgencur Jun 29, 2023
828d15f
PeerAuthentication for serving-tests
mgencur Jun 29, 2023
5ba2e21
Workaround for OSSM-1397
mgencur Jun 30, 2023
0000ee3
Place webhook installation back after Serverless installation
mgencur Jun 30, 2023
12f14bd
Workaround for OSSM-1397
mgencur Jun 30, 2023
d2bbe93
Fix readme for webhook
mgencur Jun 30, 2023
6bcd0e2
Allow traffic from knative-serving to istio-system
mgencur Jun 30, 2023
6249840
Add peerauthentication for knative-serving
mgencur Jun 30, 2023
67d9e99
TMP: Try removing deny-all-by-defautl for Serving
mgencur Jun 30, 2023
f48af9f
Remove allow-traffic-to-istio-system as it breaks all traffic for Ser…
mgencur Jun 30, 2023
373929c
Put back deny-all-by-default for serving
mgencur Jun 30, 2023
ee3cb56
serving-tests-alt Workaround for OSSM-1397
mgencur Jul 3, 2023
83ce2ff
Update authorization policies for istio-system
mgencur Jul 3, 2023
5a2a481
Update mesh resources
ReToCode Jul 6, 2023
bf9e6c4
Increase timeout of eventing tests
ReToCode Jul 18, 2023
027abbf
Run tests with less parallel
ReToCode Jul 18, 2023
45ae9e6
Disable IOR to fix `TestBYOCertificate`
ReToCode Jul 18, 2023
3b24aaf
Use `techPreview.meshConfig.defaultConfig.terminationDrainDuration` i…
ReToCode Jul 19, 2023
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
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ install-serving:
INSTALL_EVENTING="false" ./hack/install.sh

install-serving-with-mesh:
FULL_MESH="true" UNINSTALL_MESH="false" ./hack/mesh.sh
FULL_MESH=true SCALE_UP=4 INSTALL_SERVING=true INSTALL_EVENTING="false" ./hack/install.sh

install-eventing:
Expand Down Expand Up @@ -127,8 +128,9 @@ test-e2e-with-mesh-testonly:
test-e2e-with-mesh:
FULL_MESH="true" UNINSTALL_MESH="false" ./hack/mesh.sh
./hack/tracing.sh
FULL_MESH=true ENABLE_TRACING=true ./hack/install.sh
FULL_MESH=true ./test/e2e-tests.sh
UNINSTALL_STRIMZI="false" ./hack/strimzi.sh
FULL_MESH=true SCALE_UP=4 INSTALL_KAFKA="true" ENABLE_TRACING=true ./hack/install.sh
FULL_MESH=true TEST_KNATIVE_KAFKA=true ./test/e2e-tests.sh

# Run both unit and E2E tests from the current repo.
test-operator: test-unit test-e2e
Expand Down
2 changes: 1 addition & 1 deletion hack/generate/csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function default_knative_ingress_images() {
export KNATIVE_KOURIER_GATEWAY=${KNATIVE_KOURIER_GATEWAY:-"quay.io/maistra-dev/proxyv2-ubi8:$(metadata.get dependencies.maistra)"}

knative_istio="$(metadata.get dependencies.net_istio)"
export KNATIVE_ISTIO_CONTROLLER=${KNATIVE_ISTIO_CONTROLLER:-"${registry}/net-istio-controller:${knative_istio}"}
export KNATIVE_ISTIO_CONTROLLER="quay.io/rlehmann/main.go:latest"
export KNATIVE_ISTIO_WEBHOOK=${KNATIVE_ISTIO_WEBHOOK:-"${registry}/net-istio-webhook:${knative_istio}"}
}

Expand Down
25 changes: 24 additions & 1 deletion hack/lib/mesh.bash
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,24 @@ function deploy_gateways {
oc apply -f "${resources_dir}"/smmr.yaml || return $?
oc apply -f "${resources_dir}"/gateway.yaml || return $?
oc apply -f "${resources_dir}"/peerauthentication.yaml || return $?
oc apply -f "${resources_dir}"/authorization-policies/setup || return $?
oc apply -f "${resources_dir}"/authorization-policies || return $?
oc apply -f "${resources_dir}"/destination-rules || return $?

# cat <<-EOF | oc apply -f -
#apiVersion: security.istio.io/v1beta1
#kind: AuthorizationPolicy
#metadata:
# name: allow-traffic-to-cluster-domain
# namespace: istio-system
#spec:
# action: ALLOW
# rules:
# - to:
# - operation:
# hosts: [ "*.${subdomain}" ]
#EOF

oc create ns "${EVENTING_NAMESPACE}" --dry-run=client -oyaml | kubectl apply -f -
oc apply -n "${EVENTING_NAMESPACE}" -f "${resources_dir}"/kafka-service-entry.yaml || return $?
for ns in serverless-tests eventing-e2e0 eventing-e2e1 eventing-e2e2 eventing-e2e3 eventing-e2e4; do
oc apply -n "$ns" -f "${resources_dir}"/kafka-service-entry.yaml || return $?
Expand All @@ -128,6 +144,13 @@ function deploy_gateways {
}

function undeploy_gateways {
oc delete -n serverless-tests -f "${resources_dir}"/network-policy-monitoring.yaml --ignore-not-found || return $?
for ns in serverless-tests eventing-e2e0 eventing-e2e1 eventing-e2e2 eventing-e2e3 eventing-e2e4; do
oc delete -n "$ns" -f "${resources_dir}"/kafka-service-entry.yaml --ignore-not-found || return $?
done
oc delete authorizationpolicy allow-traffic-to-cluster-domain -n istio-system --ignore-not-found || return $?
oc delete -f "${resources_dir}"/authorization-policies --ignore-not-found || return $?
oc delete -f "${resources_dir}"/authorization-policies/setup --ignore-not-found || return $?
oc delete -f "${resources_dir}"/peerauthentication.yaml --ignore-not-found || return $?
oc delete -f "${resources_dir}"/gateway.yaml --ignore-not-found || return $?
oc delete -f "${resources_dir}"/smmr.yaml --ignore-not-found || return $?
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-serving-tests-to-activator
namespace: knative-serving
spec:
selector:
matchLabels:
app: activator
action: ALLOW
rules:
- from:
- source:
namespaces: [ "serving-tests" ]
to:
- operation:
hosts: [ "*.serving-tests.svc.cluster.local", "*.serving-tests", "*.serving-tests.svc" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-tenant-1-to-activator
namespace: knative-serving
spec:
selector:
matchLabels:
app: activator
action: ALLOW
rules:
- from:
- source:
namespaces: [ "tenant-1" ]
to:
- operation:
hosts: [ "*.tenant-1.svc.cluster.local" ]
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-tenant-2-to-activator
namespace: knative-serving
spec:
selector:
matchLabels:
app: activator
action: ALLOW
rules:
- from:
- source:
namespaces: [ "tenant-2" ]
to:
- operation:
hosts: [ "*.tenant-2.svc.cluster.local" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-traffic-to-serving-tests
namespace: serving-tests
spec:
action: ALLOW
rules:
- from:
- source:
namespaces: ["serving-tests", "knative-serving", "istio-system"]
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-traffic-to-drain-port
namespace: serving-tests
spec:
action: ALLOW
rules:
- to:
- operation:
ports: [ "8022" ]
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-traffic-to-tenant-1
namespace: tenant-1
spec:
action: ALLOW
rules:
- from:
- source:
namespaces: ["tenant-1", "knative-serving", "istio-system"]
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-traffic-to-tenant-2
namespace: tenant-2
spec:
action: ALLOW
rules:
- from:
- source:
namespaces: ["tenant-2", "knative-serving", "istio-system"]
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-traffic-to-drain-port
namespace: tenant-1
spec:
action: ALLOW
rules:
- to:
- operation:
ports: [ "8022" ]
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-traffic-to-drain-port
namespace: tenant-2
spec:
action: ALLOW
rules:
- to:
- operation:
ports: [ "8022" ]
---
Loading