Skip to content

Conversation

@naemono
Copy link
Contributor

@naemono naemono commented Nov 24, 2025

re: #8929

image

From my local testing, this defaults properly to the pod name, which makes stack monitoring a bit more useful in the case of multiple Kibana instances.

Update unit tests

Signed-off-by: Michael Montgomery <[email protected]>
@prodsecmachine
Copy link
Collaborator

prodsecmachine commented Nov 24, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@botelastic botelastic bot added the triage label Nov 24, 2025
@naemono naemono marked this pull request as ready for review November 24, 2025 21:48
@naemono naemono changed the title WIP: Do not set Kibana server.name Do not set Kibana server.name Nov 24, 2025
@naemono naemono added the >enhancement Enhancement of existing functionality label Nov 24, 2025
@botelastic botelastic bot removed the triage label Nov 24, 2025
Copilot finished reviewing on behalf of naemono November 24, 2025 21:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the automatic setting of the server.name configuration in Kibana deployments to allow Kibana to default to using the pod name instead. This improves the usefulness of stack monitoring when multiple Kibana instances are deployed, as each instance will have a unique identifier based on its pod name rather than all sharing the same Kibana resource name.

Key Changes

  • Removed automatic setting of server.name in the base Kibana configuration
  • Updated test expectations to reflect the absence of server.name in generated configurations

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/controller/kibana/config_settings.go Removed the ServerName: kb.Name entry from the base settings map, allowing Kibana to use its default server name (pod name)
pkg/controller/kibana/config_settings_test.go Updated test fixtures defaultConfig and defaultConfig8 to remove the expected name: "testkb" line from server configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@pebrc
Copy link
Collaborator

pebrc commented Nov 25, 2025

Change looks good to me code wise. But I am trying to assess any issues this might cause for existing users.

Monitoring History Continuity:
If you're using Stack Monitoring:
Historical monitoring data will show the old name
New monitoring data will show the new name
This might make it look like you have two different Kibana instances in your monitoring dashboards
Queries or dashboards filtering by instance name will need to be updated.

kbn-name header:
Its value is taken from the server.name setting. Any external integration or script that relies on that header value might break. I am not sure it is a legitimate expectation. Also any custom query that relies on kibana_stats.kibana.name could potentially break.

Copy link
Collaborator

@pebrc pebrc left a comment

Choose a reason for hiding this comment

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

LGTM
Let's make sure to include this in the breaking changes documentation for the next release where we

  • explain our motivation (official Kibana documentation)
  • mention the workaround for uses that want to restore the original (incorrect) behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement Enhancement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants