forked from openservicemesh/osm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backpressure: filter policy based on app label (openservicemesh#1454)
Only apply the backpressure policy for an upstream cluster if the namespace and app label in the policy match.
- Loading branch information
1 parent
cc75e51
commit d543df0
Showing
7 changed files
with
98 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
set -aueo pipefail | ||
|
||
# shellcheck disable=SC1091 | ||
source .env | ||
|
||
echo "Apply backpressure policy for the bookstore-v1 service" | ||
kubectl apply -f - <<EOF | ||
apiVersion: policy.openservicemesh.io/v1alpha1 | ||
kind: Backpressure | ||
metadata: | ||
name: max-connections-bookstore-v1 | ||
namespace: "${BOOKSTORE_NAMESPACE}" | ||
labels: | ||
app: bookstore-v1 | ||
spec: | ||
maxConnections: 5 | ||
EOF | ||
|
||
echo "Apply backpressure policy for the bookstore-v2 service" | ||
kubectl apply -f - <<EOF | ||
apiVersion: policy.openservicemesh.io/v1alpha1 | ||
kind: Backpressure | ||
metadata: | ||
name: max-connections-connections-bookstore-v2 | ||
namespace: "${BOOKSTORE_NAMESPACE}" | ||
labels: | ||
app: bookstore-v2 | ||
spec: | ||
maxConnections: 5 | ||
EOF |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters