Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollout canary steps supports Metrics analysis, Hook Mechanism #16

Open
zmberg opened this issue Mar 9, 2022 · 2 comments
Open

Rollout canary steps supports Metrics analysis, Hook Mechanism #16

zmberg opened this issue Mar 9, 2022 · 2 comments

Comments

@zmberg
Copy link
Member

zmberg commented Mar 9, 2022

What would you like to be added:

Rollout release process supports post-checking, Metrics analysis, as follows:

apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
spec:
  strategy:
    objectRef:
      ...
    canary:
      steps:
      - weight: 5
        ...
      # metrics analysis
      analysis:
        templates:
        - templateName: success-rate
          startingStep: 2 # delay starting analysis run until setWeight: 40%
          args:
          - name: service-name
            value: guestbook-svc.default.svc.cluster.local

# metrics analysis
apiVersion: rollouts.kruise.io/v1alpha1
kind: AnalysisTemplate
metadata:
  name: success-rate
spec:
  args:
  - name: service-name
  metrics:
  - name: success-rate
    interval: 5m
    # NOTE: prometheus queries return results in the form of a vector.
    # So it is common to access the index 0 of the returned array to obtain the value
    successCondition: result[0] >= 0.95
    failureLimit: 3
    provider:
      prometheus:
        address: http://prometheus.example.com:9090
        query: |
          sum(irate(
            istio_requests_total{reporter="source",destination_service=~"{{args.service-name}}",response_code!~"5.*"}[5m]
          )) / 
          sum(irate(
            istio_requests_total{reporter="source",destination_service=~"{{args.service-name}}"}[5m]
          ))
@zmberg
Copy link
Member Author

zmberg commented Apr 15, 2022

/assign @GingoBang

@zmberg zmberg changed the title Rollout release process supports post-checking, Metrics analysis Rollout canary steps supports Metrics analysis, Hook Mechanism Apr 28, 2022
@Chuhan1112
Copy link

Any progress on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants