We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3921e53 commit fb22b40Copy full SHA for fb22b40
pkg/operator/fluent-bit-service.go
@@ -29,6 +29,11 @@ func MakeFluentbitService(fb fluentbitv1alpha2.FluentBit) *corev1.Service {
29
labels = fb.Labels
30
}
31
32
+ podLabelSelector := fb.Labels
33
+ if len(fb.Spec.Labels) > 0 {
34
+ podLabelSelector = fb.Spec.Labels
35
+ }
36
+
37
var FluentBitMetricsPort int32
38
if fb.Spec.MetricsPort != 0 {
39
FluentBitMetricsPort = fb.Spec.MetricsPort
@@ -43,7 +48,7 @@ func MakeFluentbitService(fb fluentbitv1alpha2.FluentBit) *corev1.Service {
43
48
Labels: labels,
44
49
},
45
50
Spec: corev1.ServiceSpec{
46
- Selector: fb.Labels,
51
+ Selector: podLabelSelector,
47
52
Type: corev1.ServiceTypeClusterIP,
53
Ports: []corev1.ServicePort{
54
{
0 commit comments