Skip to content

[RUN AS-IF-FOSS] Include Canary Ingress Weight in Rollout Status

What does this MR do?

Today, when users visits Deploy Board, GitLab fetches the Kubernetes Deployments and Pods information in order to render the rollout status. In the upcoming milestone, we're going to extend the UI to control the traffic weight. To do so, Ingresses information has to be included in rollout status at first.

This MR includes the Ingress information (Specifically, Canary Ingress because that's the traffic control layer/service) into the current rollout status, and let frontend to work on the Set deployment Traffic Weight via UI . This MR is also useful to debug Add Support for Canary-Weight ingress annotation via API as at least it let users to check the current canary weight by opening the browser inspector.

This MR also exposes the status of deployment for letting frontend check there are no running deployments present before changing the weight.

Screenshots

Tested in my local environment and confirmed that the Canary Weight is correctly fetched and exposed in the Rollout Status.

screenshot_161

This is corresponding to the kubectl describe ingress output that directly fetched from the Kubernetes.

shinya@shinya-MS-7A34:~/workspace/thin-gdk$ k describe ingress production-canary-auto-deploy -n new-thunder-cat-141-production
Name:             production-canary-auto-deploy
Namespace:        new-thunder-cat-141-production
Address:          34.66.68.39
Default backend:  default-http-backend:80 (10.11.0.6:8080)
TLS:
  production-canary-auto-deploy-tls terminates le-141.35.223.171.35.nip.io,root-new-thunder-cat.35.223.171.35.nip.io
Rules:
  Host                                       Path  Backends
  ----                                       ----  --------
  root-new-thunder-cat.35.223.171.35.nip.io  
                                             /   production-canary-auto-deploy:5000 (10.11.0.11:5000,10.11.1.13:5000)
  le-141.35.223.171.35.nip.io                
                                             /   production-canary-auto-deploy:5000 (10.11.0.11:5000,10.11.1.13:5000)
Annotations:                                 kubernetes.io/ingress.class: nginx
                                             kubernetes.io/tls-acme: true
                                             meta.helm.sh/release-name: production-canary
                                             meta.helm.sh/release-namespace: new-thunder-cat-141-production
                                             nginx.ingress.kubernetes.io/canary: true
                                             nginx.ingress.kubernetes.io/canary-by-header: canary
                                             nginx.ingress.kubernetes.io/canary-weight: 50
Events:                                      <none>

Feature Flag

This feature is disabled by default and will be rolled out in #260295 (closed).

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Shinya Maeda

Merge request reports