-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat:Add Gateway Plugin Support (#686)
* Install the Gateway plugin in fleet Signed-off-by: Gidi233 <[email protected]> * Support the Gateway plugin in application Signed-off-by: Gidi233 <[email protected]> * Add example Signed-off-by: Gidi233 <[email protected]> * Add gen Signed-off-by: Gidi233 <[email protected]> * fix warning and add log Signed-off-by: Gidi233 <[email protected]> * Change comments and redundant logic Signed-off-by: Gidi233 <[email protected]> * Change example Signed-off-by: Gidi233 <[email protected]> * add gen Signed-off-by: Gidi233 <[email protected]> * fix Signed-off-by: Gidi233 <[email protected]> * fix example Signed-off-by: Gidi233 <[email protected]> --------- Signed-off-by: Gidi233 <[email protected]>
- Loading branch information
Showing
23 changed files
with
1,090 additions
and
69 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
apiVersion: apps.kurator.dev/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: abtesting-nginx-demo | ||
namespace: default | ||
spec: | ||
source: | ||
gitRepository: | ||
interval: 3m0s | ||
ref: | ||
branch: master | ||
timeout: 1m0s | ||
url: https://github.com/stefanprodan/podinfo | ||
syncPolicies: | ||
- destination: | ||
fleet: quickstart | ||
kustomization: | ||
interval: 0s | ||
path: ./deploy/webapp | ||
prune: true | ||
timeout: 2m0s | ||
rollout: | ||
testLoader: true | ||
trafficRoutingProvider: nginx | ||
workload: | ||
apiVersion: apps/v1 | ||
name: backend | ||
kind: Deployment | ||
namespace: webapp | ||
serviceName: backend | ||
port: 9898 | ||
rolloutPolicy: | ||
trafficRouting: | ||
analysisTimes: 3 | ||
timeoutSeconds: 60 | ||
host: "app.example.com" | ||
match: | ||
- headers: | ||
x-canary: | ||
exact: "insider" | ||
- headers: | ||
cookie: | ||
exact: "canary" | ||
trafficAnalysis: | ||
checkIntervalSeconds: 90 | ||
checkFailedTimes: 2 | ||
metrics: | ||
- name: nginx-request-success-rate | ||
intervalSeconds: 90 | ||
thresholdRange: | ||
min: 99 | ||
customMetric: | ||
provider: | ||
type: prometheus | ||
address: http://ingress-nginx-flagger-kurator-member-prometheus.ingress-nginx:9090 | ||
query: | | ||
sum( | ||
rate( | ||
http_requests_total{ | ||
status!~"5.*" | ||
}[{{ interval }}] | ||
) | ||
) | ||
/ | ||
sum( | ||
rate( | ||
http_requests_total[{{ interval }}] | ||
) | ||
) * 100 | ||
webhooks: | ||
timeoutSeconds: 60 | ||
command: | ||
- "hey -z 1m -q 10 -c 2 http://app.example.com/" | ||
rolloutTimeoutSeconds: 600 | ||
- destination: | ||
fleet: quickstart | ||
kustomization: | ||
targetNamespace: default | ||
interval: 5m0s | ||
path: ./kustomize | ||
prune: true | ||
timeout: 2m0s |
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,75 @@ | ||
apiVersion: apps.kurator.dev/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: blue-green-nginx-demo | ||
namespace: default | ||
spec: | ||
source: | ||
gitRepository: | ||
interval: 3m0s | ||
ref: | ||
branch: master | ||
timeout: 1m0s | ||
url: https://github.com/stefanprodan/podinfo | ||
syncPolicies: | ||
- destination: | ||
fleet: quickstart | ||
kustomization: | ||
interval: 0s | ||
path: ./deploy/webapp | ||
prune: true | ||
timeout: 2m0s | ||
rollout: | ||
testLoader: true | ||
trafficRoutingProvider: nginx | ||
workload: | ||
apiVersion: apps/v1 | ||
name: backend | ||
kind: Deployment | ||
namespace: webapp | ||
serviceName: backend | ||
port: 9898 | ||
rolloutPolicy: | ||
trafficRouting: | ||
analysisTimes: 3 | ||
timeoutSeconds: 60 | ||
host: "app.example.com" | ||
trafficAnalysis: | ||
checkIntervalSeconds: 90 | ||
checkFailedTimes: 2 | ||
metrics: | ||
- name: nginx-request-success-rate | ||
intervalSeconds: 90 | ||
thresholdRange: | ||
min: 99 | ||
customMetric: | ||
provider: | ||
type: prometheus | ||
address: http://ingress-nginx-flagger-kurator-member-prometheus.ingress-nginx:9090 | ||
query: | | ||
sum( | ||
rate( | ||
http_requests_total{ | ||
status!~"5.*" | ||
}[{{ interval }}] | ||
) | ||
) | ||
/ | ||
sum( | ||
rate( | ||
http_requests_total[{{ interval }}] | ||
) | ||
) * 100 | ||
webhooks: | ||
timeoutSeconds: 60 | ||
command: | ||
- "hey -z 1m -q 10 -c 2 http://app.example.com/" | ||
rolloutTimeoutSeconds: 600 | ||
- destination: | ||
fleet: quickstart | ||
kustomization: | ||
targetNamespace: default | ||
interval: 5m0s | ||
path: ./kustomize | ||
prune: true | ||
timeout: 2m0s |
Oops, something went wrong.