Skip to content

Make Kibana and Alertmanager optional#4567

Open
rene-dekker wants to merge 2 commits intotigera:masterfrom
rene-dekker:EV-6496
Open

Make Kibana and Alertmanager optional#4567
rene-dekker wants to merge 2 commits intotigera:masterfrom
rene-dekker:EV-6496

Conversation

@rene-dekker
Copy link
Copy Markdown
Member

@rene-dekker rene-dekker commented Mar 18, 2026

Summary

  • Add replicas field to LogStorage.spec.kibana.spec and Monitor.spec.alertManager.spec
  • When set to 0, the respective component (Kibana/Alertmanager) and associated resources are not rendered
  • Kibana defaults to 1 replica, Alertmanager defaults to 0
  • Both use their own Replicas field instead of Installation.ControlPlaneReplicas

Design

https://github.com/tigera/designs/pull/24

Breaking: Makes the replica count for Kibana and Alertmanager configurable inside their components own CR, rather than  `Installation.Spec.ControlPlaneReplicas`. 0 replicas means that they will not be rendered at all.
When unspecified, alertmanager will default to 0.
When unspecified, kibana will default to 1.

To modify Kibana, add this to your Logstorage CR:

  spec:
    kibana:
      spec:
        replicas: 0

To modify Alertmanager, add this to the monitor CR:

spec:
  alertManager:
    spec:
      replicas: 0

@rene-dekker rene-dekker requested a review from a team as a code owner March 18, 2026 16:17
@marvin-tigera marvin-tigera added this to the v1.42.0 milestone Mar 18, 2026
@rene-dekker rene-dekker marked this pull request as draft March 18, 2026 16:21
@danudey danudey modified the milestones: v1.42.0, v1.43.0 Mar 20, 2026
@rene-dekker rene-dekker force-pushed the EV-6496 branch 2 times, most recently from 7765712 to c1007e0 Compare March 26, 2026 20:34
@rene-dekker rene-dekker marked this pull request as ready for review March 26, 2026 20:35
Add Replicas *int32 to KibanaSpec and AlertManagerSpec. When set to 0,
the component and its resources are not rendered. Kibana defaults to 1,
Alertmanager defaults to 0. Both now use their own Replicas field
instead of Installation.ControlPlaneReplicas.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
}

kibanaEnabled := !r.multiTenant
if kibanaEnabled && ls.Spec.Kibana != nil && ls.Spec.Kibana.Spec != nil &&
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might be worth a common helper to avoid duplicating this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, extracted KibanaEnabled to pkg/controller/logstorage/common/common.go and updated all 3 call sites.

}

count := int32(1)
if k.cfg.Installation.ControlPlaneReplicas != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmmmm, this is technically a breaking change but maybe we're OK with that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, let me update the RN in the description.

The "is Kibana enabled" check was duplicated across the dashboards,
elastic, and manager controllers. Move it to a shared exported function
in pkg/controller/logstorage/common.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants