We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What did you do?
I tried to add custom labels to a Logstash service definition (see below how).
What did you expect to see?
I expected to see the defined labels on the created service resource.
What did you see instead? Under which circumstances?
The custom labels were replaced by the ones generated by the operator.
Environment
ECK version: 2.12.1
Kubernetes information: On premise, Kubespary v2.25.0.
Partial resource definition:
apiVersion: logstash.k8s.elastic.co/v1alpha1 kind: Logstash metadata: name: "logstash" spec: # Actual spec cut for brevity services: - name: inputs service: metadata: annotations: io.cilium/lb-ipam-ips: "1.2.3.4" labels: io.cilium/address-pool: public spec: type: LoadBalancer allocateLoadBalancerNodePorts: false ports: - port: 5044 name: agent protocol: TCP targetPort: 5044 - port: 9800 name: logstash protocol: TCP targetPort: 9800
Comments The custom annotations are preserved, but the labels are replaced. I think here:
https://github.com/elastic/cloud-on-k8s/blob/v2.12.1/pkg/controller/logstash/service.go#L72-L74
I think merging with user-defined labels would be preferrable.
The text was updated successfully, but these errors were encountered:
Hey @lpeter91
Thank you for reporting this issue.
I think merging with user-defined labels would be preferable.
I agree, we seem to do this for other services, too.
Sorry, something went wrong.
Fix Logstash service to preserve user defined labels
38238f7
Fixes: elastic#7855
Fix Logstash service to preserve user defined labels (#7895)
8270ad0
This commit preserves user labels in Logstash Service Fixes: #7855 The following resource should keep customized label in service `logstash-sample-ls-beats` ```yaml 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 ``` --------- Co-authored-by: Peter Brachwitz <peter.brachwitz@gmail.com>
Successfully merging a pull request may close this issue.
What did you do?
I tried to add custom labels to a Logstash service definition (see below how).
What did you expect to see?
I expected to see the defined labels on the created service resource.
What did you see instead? Under which circumstances?
The custom labels were replaced by the ones generated by the operator.
Environment
ECK version: 2.12.1
Kubernetes information: On premise, Kubespary v2.25.0.
Partial resource definition:
Comments
The custom annotations are preserved, but the labels are replaced. I think here:
https://github.com/elastic/cloud-on-k8s/blob/v2.12.1/pkg/controller/logstash/service.go#L72-L74
I think merging with user-defined labels would be preferrable.
The text was updated successfully, but these errors were encountered: