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

Research possible integration with Flagger #3050

Open
Tracked by #2850
odubajDT opened this issue Feb 14, 2024 · 3 comments
Open
Tracked by #2850

Research possible integration with Flagger #3050

odubajDT opened this issue Feb 14, 2024 · 3 comments

Comments

@odubajDT
Copy link
Contributor

odubajDT commented Feb 14, 2024

Goal

Make a research and come up with a strategy how it would be possible to integrate Keptn with Flagger. Look at the possibility of using Keptn metrics for release analysis.
As well look at the possibility of using Keptn observability monitoring of progressive delivery.

Questions for the research

  • Is it possible to integrate Keptn with Flagger?
  • How we can use Keptn to provide obserbavility data for progressive delivery via Flagger?
  • Can we use Keptn metrics for release analysis performed by Flagger?

If possible, let's create a small PoC as part of this research (in the points where it makes sense).

@bacherfl
Copy link
Member

bacherfl commented Mar 29, 2024

#3371 contains a simple PoC

The PoC shows a integration of Keptn Metrics
into a Flagger Canary.
In this example, we are making use of the Prometheus endpoint provided
by Keptn (i.e. the metrics-operator), which serves the values of all KeptnMetrics.

This way, we are able to use a Flagger MetricTemplate of type prometheus,
which retrieves the value from a Prometheus instance that has access to the KeptnMetrics.

The example is based on the Istio Canary Deployments tutorial
provided in the Flagger docs.

The difference to the tutorial is that instead of using the request-duration duration
provided by Istio via Prometheus, we are referring to a KeptnMetric called response-time.
The Flagger metrics provider is in this case still prometheus.

What could be an interesting idea would be to contribute to Flagger by adding
a keptn metrics provider to their provider implementations.
This would also open up the possibility to use Keptn Analyses in Flagger, which might be a
valuable addition that benefits both projects.

In terms of observability, we do get the OpenTelemetry traces generated by Keptn out of the box
if the relevant annotations are present in the deployment managed by Flagger.

The addition of pre-/post-deployment tasks using Keptn is also possible,
but here Flagger provides a similar concept via Webhooks,
which are naturally more tailored to Flagger as they also allow to do intermediate checks after the
pods for the canary deployment have been started, e.g. to decide if more traffic should be sent to the canary.
This is something Keptn does not provide, as we operate on pre-/post-deployment of the deployment, but
are not aware of the canary increments of Flagger.

@mowies
Copy link
Member

mowies commented Apr 3, 2024

contributing a keptn provider implementation to Flagger makes a lot of sense, great research!

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be
closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants