diff --git a/pkg/operator/collector-statefulset.go b/pkg/operator/collector-statefulset.go index 79edaf1f7..fd5f72f87 100644 --- a/pkg/operator/collector-statefulset.go +++ b/pkg/operator/collector-statefulset.go @@ -117,6 +117,10 @@ func MakefbStatefulset(co fluentbitv1alpha2.Collector) *appsv1.StatefulSet { statefulset.Spec.Template.Spec.Containers[0].VolumeMounts = append(statefulset.Spec.Template.Spec.Containers[0].VolumeMounts, co.Spec.VolumesMounts...) } + if co.Spec.Ports != nil { + statefulset.Spec.Template.Spec.Containers[0].Ports = append(statefulset.Spec.Template.Spec.Containers[0].Ports, co.Spec.Ports...) + } + // Mount Secrets for _, secret := range co.Spec.Secrets { statefulset.Spec.Template.Spec.Volumes = append(statefulset.Spec.Template.Spec.Volumes, corev1.Volume{