Browse Source

update cluster analysis

pull/82/head
brandon 4 years ago
parent
commit
734d798a37
  1. 4
      helm-guestbook/templates/cluster_analysis.yaml
  2. 5
      helm-guestbook/templates/rollout.yaml
  3. 32
      helm-guestbook/values.yaml

4
helm-guestbook/templates/cluster_analysis.yaml

@ -7,9 +7,9 @@ spec:
- name: service-name - name: service-name
metrics: metrics:
- name: success-rate - name: success-rate
successCondition: result[0] <= 0.10 successCondition: isNaN(result[0]) || result[0] <= 0.10
provider: provider:
prometheus: prometheus:
address: "http://a0179abbebc504fe1a02cc2868d10d20-1436141555.us-east-2.elb.amazonaws.com:9090" address: "http://a0179abbebc504fe1a02cc2868d10d20-1436141555.us-east-2.elb.amazonaws.com:9090"
query: | query: |
round(sum(irate(nginx_ingress_controller_requests{controller_pod=~"$controller",controller_class=~"nginx",controller_namespace=~"ingress-nginx",ingress=~"$ingress"}[2m])) by (ingress), 0.001) sum(rate(nginx_ingress_controller_requests{ingress="guestbook-helm-guestbook", controller_class="nginx",exported_namespace="guestbook-helm-guestbook",status!~"[4-5].*"}[5m])) by (ingress) / sum(rate(nginx_ingress_controller_requests{ingress="guestbook-helm-guestbook", controller_class="nginx",exported_namespace="guestbook-helm-guestbook"}[5m])) by (ingress)

5
helm-guestbook/templates/rollout.yaml

@ -73,5 +73,6 @@ spec:
stableIngress: {{ template "helm-guestbook.fullname" . }} stableIngress: {{ template "helm-guestbook.fullname" . }}
annotationPrefix: nginx.ingress.kubernetes.io # optional annotationPrefix: nginx.ingress.kubernetes.io # optional
additionalIngressAnnotations: # optional additionalIngressAnnotations: # optional
canary-by-header: Region canary-by-header: tenantID
canary-by-header-value: aspc|eu canary-by-header-value: us-east|us-west|eu|apac#TODO tenantID values
canary-weight: 20

32
helm-guestbook/values.yaml

@ -15,37 +15,7 @@ service:
ingress: ingress:
enabled: true enabled: true
annotations: annotations:
# kubernetes.io/ingress.class: alb
# alb.ingress.kubernetes.io/actions.root-service: |
# {
# "Type":"forward",
# "ForwardConfig":{
# "TargetGroups":[
# {
# "Weight":20,
# "ServiceName":"canary-service",
# "ServicePort":"{{ .Values.service.port }}"
# },
# {
# "Weight":40,
# "ServiceName":"canary-service",
# "ServicePort":"{{ .Values.service.port }}"
# },
# {
# "Weight":60,
# "ServiceName":"canary-service",
# "ServicePort":"{{ .Values.service.port }}"
# },
# {
# "Weight":80,
# "ServiceName":"stable-service",
# "ServicePort":"{{ .Values.service.port }}"
# }
# ]
# }
# }
# nginx.ingress.kubernetes.io/canary: "true"
kubernetes.io/ingress.class: nginx kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/ssl-redirect: "false"
# nginx.ingress.kubernetes.io/rewrite-target: / # nginx.ingress.kubernetes.io/rewrite-target: /

Loading…
Cancel
Save