weaveworks / pipeline-controller

This repository contains the Pipeline CRD and associated controller for Weave GitOps Enterprise.
1 stars 4 forks source link

[spike] Pull based model to get HelmRelease events #180

Closed luizbafilho closed 12 months ago

luizbafilho commented 1 year ago

This PR is all about trying out a new way of getting events from HelmReleases. Instead of the old way where we used webhooks to get notified when something happened, we're going for a pull-based model.

The big idea here is to make our Pipeline configuration simpler. That means no more messing around with setting up notification-controller providers and alerts.

What's going on

   sequenceDiagram
    actor U as operator
    U->>+API Server: creates Pipeline
    participant PC as Pipeline Controller
    participant PS as Promotion Strategy
    API Server->>+PC: notifies
    participant dt1 as dev/target 1

    rect rgb(67, 207, 250)
    note right of PC: setup phase
    note right of PC: pipelines.wego.weave.works/name<br/>pipelines.wego.weave.works/env<br/>pipelines.wego.weave.works/target
    PC->>+dt1: label AppRef with metadata
    participant dt2 as dev/target 2
    PC->>+dt2: label AppRef with metadata
    participant pt1 as prod/target 1
    PC->>+pt1: label AppRef with metadata
    end

    rect rgb(50, 227, 221)
    note right of PC: promotion phase
    PC-->>+dt1: watches HelmRelease and Kustomizations changes
    PC-->>+dt2: watches HelmRelease and Kustomizations changes
    PC-->>+pt1: watches HelmRelease and Kustomizations changes
    end

    dt1->>+PC: update events from AppRef
    PC ->>PC: filter upgrade events 
    PC ->>PC: extract metadata 
    PC->>+PS: kicks off
luizbafilho commented 1 year ago

/make-pr-image

luizbafilho commented 1 year ago

/make-pr-image

luizbafilho commented 1 year ago

/make-pr-image

luizbafilho commented 1 year ago

/make-pr-image

luizbafilho commented 1 year ago

/make-pr-image

squaremo commented 12 months ago

This is superseded by #193.