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

Fix Logstash service to preserve user defined labels #7895

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

kaisecheng
Copy link
Contributor

This commit preserves user labels in Logstash Service

Fixes: #7855

The following resource should keep customized label in service logstash-sample-ls-beats

apiVersion: logstash.k8s.elastic.co/v1alpha1
kind: Logstash
metadata:
  name: logstash-sample
spec:
  count: 1
  version: 8.14.0
  pipelines:
    - pipeline.id: main
      pipeline.workers: 2
      config.string: "input { beats { port => 5044 }} output { stdout {}}"
  services:
    - name: beats
      service:
        metadata:
          labels:
            i.am.label: here
        spec:
          type: ClusterIP
          ports:
            - port: 5044
              name: "filebeat"
              protocol: TCP
              targetPort: 5044

@botelastic botelastic bot added the triage label Jun 11, 2024
@thbkrkr thbkrkr added >bug Something isn't working :logstash labels Jun 11, 2024
@botelastic botelastic bot removed the triage label Jun 11, 2024
@kaisecheng kaisecheng requested a review from robbavey June 12, 2024 12:05
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

pkg/controller/logstash/service_test.go Outdated Show resolved Hide resolved
kaisecheng and others added 2 commits June 12, 2024 14:43
Co-authored-by: Peter Brachwitz <peter.brachwitz@gmail.com>
Copy link
Member

@robbavey robbavey left a comment

Choose a reason for hiding this comment

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

LGTM

@kaisecheng
Copy link
Contributor Author

@pebrc this PR is ready to merge. thank you

@pebrc pebrc added the v2.14.0 label Jun 12, 2024
@pebrc pebrc merged commit 8270ad0 into elastic:main Jun 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working :logstash v2.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Logstash service labels are not preserved
4 participants