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

[CPDEV-93591] Expose Calico Typha metrics #517

Merged
merged 6 commits into from
Oct 17, 2023

Conversation

ilia1243
Copy link
Contributor

@ilia1243 ilia1243 commented Oct 11, 2023

Description

Solution

  • Added service for calico-typha that exposes metrics.
  • Added env variables for Typha deployment to enable metrics.
  • Fixed documentation and added configuration to collect Typha metrics.

How to apply

Run kubemarine migrate_kubemarine --force-apply calico_typha_metrics

Test Cases

TestCase 1

Install cluster with monitoring.

Steps:

  1. Install cluster with calico.typha=enabled.
  2. Install prometheus-operator
  3. Follow steps from documentation/Installation.md#calico-metrics-configuration

Results:

Before After
Metrics for calico are not collected Metrics for calico-node, calico-kube-controllers, calico-typha are collected

TestCase 2

Migrate Kubemarine, enable metrics for calico-typha.

Steps:

  1. Install cluster with calico.typha=enabled using old version of Kubemarine.
  2. Run kubemarine migrate_kubemarine --force-apply calico_typha_metrics using new version of Kubemarine.
  3. Install prometheus-operator
  4. Follow steps from documentation/Installation.md#calico-metrics-configuration

ER: metrics are collected for all calico services.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Integration CI passed
  • Unit tests. If Yes list of new/changed tests with brief description
  • There is no merge conflicts

Unit tests

test_calico.py - cover changed enrichment of calico manifest
test_builtin.py - cover internal API in builtin.py.

@ilia1243 ilia1243 added documentation Improvements or additions to documentation improvement New feature or request labels Oct 11, 2023
@ilia1243 ilia1243 changed the title CPDEV-93591 Expose Calico Typha metrics [CPDEV-93591] Expose Calico Typha metrics Oct 11, 2023
@ilia1243 ilia1243 force-pushed the improvement/calico_typha_monitoring branch from a312de0 to bba02a7 Compare October 11, 2023 07:51
Copy link
Contributor

@shmo1218 shmo1218 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc review is done.

@ilia1243 ilia1243 force-pushed the improvement/calico_typha_monitoring branch from adb106a to 53886dd Compare October 11, 2023 13:02
@ilia1243 ilia1243 force-pushed the improvement/calico_typha_monitoring branch from 409fd8b to c2e1f24 Compare October 17, 2023 10:19
@koryaga koryaga merged commit b226dd9 into main Oct 17, 2023
@koryaga koryaga deleted the improvement/calico_typha_monitoring branch October 17, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants