File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -358,8 +358,6 @@ func (b *StorageStatefulSetBuilder) buildCaStorePatchingInitContainerVolumeMount
358358
359359func (b * StorageStatefulSetBuilder ) buildContainerPorts () []corev1.ContainerPort {
360360 podPorts := []corev1.ContainerPort {{
361- Name : "grpc" , ContainerPort : api .GRPCPort ,
362- }, {
363361 Name : "interconnect" , ContainerPort : api .InterconnectPort ,
364362 }, {
365363 Name : "status" , ContainerPort : api .StatusPort ,
@@ -414,11 +412,16 @@ func (b *StorageStatefulSetBuilder) buildContainer() corev1.Container { // todo
414412 Resources : containerResources ,
415413 }
416414
415+ livenessProbePort := api .GRPCPort
416+ if b .Spec .Service .GRPC .Port != 0 {
417+ livenessProbePort = int (b .Spec .Service .GRPC .Port )
418+ }
419+
417420 if value , ok := b .ObjectMeta .Annotations [api .AnnotationDisableLivenessProbe ]; ! ok || value != api .AnnotationValueTrue {
418421 container .LivenessProbe = & corev1.Probe {
419422 ProbeHandler : corev1.ProbeHandler {
420423 TCPSocket : & corev1.TCPSocketAction {
421- Port : intstr .FromInt (api . GRPCPort ),
424+ Port : intstr .FromInt (livenessProbePort ),
422425 },
423426 },
424427 }
You can’t perform that action at this time.
0 commit comments