Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cd864a5
Install Mesh Resources for multitenancy
mgencur Jun 19, 2023
adb5573
Update authorization policies
mgencur Jun 28, 2023
dd2b842
Update teardown for Mesh
mgencur Jun 28, 2023
341c922
Revert "Update authorization policies"
mgencur Jun 28, 2023
6f0d06f
Test Kafka together with Mesh
mgencur Jun 28, 2023
c8a6ad2
Add more policies
mgencur Jun 28, 2023
004d6f9
Remove some policies
mgencur Jun 28, 2023
78d6bef
Add policies #1
mgencur Jun 28, 2023
c75cd42
Add policies - allow probe
mgencur Jun 28, 2023
78cc259
Introduce default environment for eventinge2erekt tests
mgencur Jun 28, 2023
c3d8689
Fix lint
mgencur Jun 28, 2023
2a69abd
Update readme for serving/metadata-webhook
mgencur Jun 28, 2023
989a08b
Add allow-serverless-tests-kafka-channel auth policy
mgencur Jun 28, 2023
083d24c
Add deny-all-by-default policies
mgencur Jun 28, 2023
b9e54d9
Allow traffic to autoscaler from activator
mgencur Jun 28, 2023
1d841a2
Use heml chart from pirDipi to generate policies
mgencur Jun 28, 2023
a7c5230
Use auth policies from pierDipi's helm chart
mgencur Jun 29, 2023
4bbdd18
Update helm chart for serverless-tests
mgencur Jun 29, 2023
5243d3b
Add policies for serving-tests ns for upstream tests
mgencur Jun 29, 2023
26ce627
PeerAuthentication for serving-tests
mgencur Jun 29, 2023
6bddabd
Workaround for OSSM-1397
mgencur Jun 30, 2023
8cdb6e4
Place webhook installation back after Serverless installation
mgencur Jun 30, 2023
bcd43cf
Workaround for OSSM-1397
mgencur Jun 30, 2023
0d09462
Fix readme for webhook
mgencur Jun 30, 2023
5283201
Allow traffic from knative-serving to istio-system
mgencur Jun 30, 2023
ee5d5f6
Add peerauthentication for knative-serving
mgencur Jun 30, 2023
9ba1c03
TMP: Try removing deny-all-by-defautl for Serving
mgencur Jun 30, 2023
96e161f
Remove allow-traffic-to-istio-system as it breaks all traffic for Ser…
mgencur Jun 30, 2023
16eed4e
Put back deny-all-by-default for serving
mgencur Jun 30, 2023
a42ae9c
serving-tests-alt Workaround for OSSM-1397
mgencur Jul 3, 2023
451a9eb
Update authorization policies for istio-system
mgencur Jul 3, 2023
b5abe20
Update mesh resources
ReToCode Jul 6, 2023
8180777
Run tests with less parallel
ReToCode Jul 18, 2023
d23cf5a
Disable IOR to fix `TestBYOCertificate`
ReToCode Jul 18, 2023
3a6da52
Use `techPreview.meshConfig.defaultConfig.terminationDrainDuration` i…
ReToCode Jul 19, 2023
2fa28b9
Reduce parallelism only on mesh tests
ReToCode Jul 19, 2023
42013b4
Use annotation to omit IOR OCP route creation
ReToCode Jul 19, 2023
5943d92
Use specific labels for Knative gateways to omit conflict (SRVCOM-2356)
ReToCode Jul 20, 2023
1aa6643
Use updated resources from openshift-knative/knative-istio-authz-chart
ReToCode Jul 20, 2023
305f6ec
Cleanup
ReToCode Jul 21, 2023
8fcc696
Create mesh AuthorizationPolicies from helm chart automatically
ReToCode Jul 24, 2023
ca517fa
Fix cleanup script
ReToCode Jul 25, 2023
bf83511
Fix dropped test deletion on rebase
ReToCode Jul 25, 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
9 changes: 7 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 Expand Up @@ -252,6 +254,9 @@ release-files:
./hack/generate/quickstart.sh \
templates/serverless-application-quickstart.yaml \
knative-operator/deploy/resources/quickstart/serverless-application-quickstart.yaml
# TODO: uncomment as soon as chart changes are merged
# ./hack/generate/mesh-auth-policies.sh \
# tenant-1,tenant-2,serving-tests,serverless-tests

# Generates all files that can be generated, includes release files, code generation
# and updates vendoring.
Expand Down
27 changes: 27 additions & 0 deletions hack/generate/mesh-auth-policies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

set -Eeuo pipefail

tenants="${1:?Provide tenants as comma-delimited as arg[1]}"

# exit if helm is not installed
helm > /dev/null || exit 127

# shellcheck disable=SC1091,SC1090
source "$(dirname "${BASH_SOURCE[0]}")/../lib/metadata.bash"

policies_path="$(dirname "${BASH_SOURCE[0]}")/../lib/mesh_resources/authorization-policies/helm"
chart_version="$(metadata.get project.version)"

echo "Cleaning up old resources in $policies_path"

rm -rf "$policies_path"
mkdir -p "$policies_path"

for tenant in ${tenants//,/ }; do
echo "Generating AuthorizationPolicies for tenant $tenant"

helm template oci://quay.io/openshift-knative/knative-istio-authz-onboarding --version "$chart_version" --set "name=$tenant" --set "namespaces={$tenant}" > "$policies_path/$tenant.yaml"
done

echo "Istio AuthorizationPolicies successfully updated for version $chart_version"
11 changes: 9 additions & 2 deletions hack/lib/mesh.bash
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ function deploy_gateways {
oc apply -f "${resources_dir}"/namespace.yaml || return $?
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/helm || return $?

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 +128,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/helm --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
Loading