File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -221,10 +221,11 @@ func makeFluentdPorts(fd fluentdv1alpha1.Fluentd) []corev1.ContainerPort {
221221 globalInputs := fd .Spec .GlobalInputs
222222 for _ , input := range globalInputs {
223223 if input .Forward != nil {
224- forwardPort := * input . Forward . Port
225- if forwardPort == 0 {
226- forwardPort = DefaultForwardPort
224+ forwardPort := DefaultForwardPort
225+ if input . Forward . Port != nil {
226+ forwardPort = * input . Forward . Port
227227 }
228+
228229 ports = append (ports , corev1.ContainerPort {
229230 Name : DefaultForwardName ,
230231 ContainerPort : forwardPort ,
@@ -233,10 +234,11 @@ func makeFluentdPorts(fd fluentdv1alpha1.Fluentd) []corev1.ContainerPort {
233234 continue
234235 }
235236 if input .Http != nil {
236- httpPort := * input . Http . Port
237- if httpPort == 0 {
238- httpPort = DefaultHttpPort
237+ httpPort := DefaultHttpPort
238+ if input . Http . Port != nil {
239+ httpPort = * input . Http . Port
239240 }
241+
240242 ports = append (ports , corev1.ContainerPort {
241243 Name : DefaultHttpName ,
242244 ContainerPort : httpPort ,
You can’t perform that action at this time.
0 commit comments