@@ -101,6 +101,13 @@ const (
101101 defaultDriversInventoryPath = "/mnt/drivers-inventory"
102102)
103103
104+ const (
105+ defaultInitialDelaySeconds = 10
106+ defaultPeriodSeconds = 30
107+ startupProbePeriodSeconds = 10
108+ initialDelayStartupProbeSeconds = 30
109+ )
110+
104111// CertConfigPathMap indicates standard OS specific paths for ssl keys/certificates.
105112// Where Go looks for certs: https://golang.org/src/crypto/x509/root_linux.go
106113// Where OCP mounts proxy certs on RHCOS nodes:
@@ -804,22 +811,22 @@ func (e envVarsWithGet) Get(name string) *v1.EnvVar {
804811func setProbesDefaults (cr * mellanoxv1alpha1.NicClusterPolicy ) {
805812 if cr .Spec .OFEDDriver .StartupProbe == nil {
806813 cr .Spec .OFEDDriver .StartupProbe = & mellanoxv1alpha1.PodProbeSpec {
807- InitialDelaySeconds : 10 ,
808- PeriodSeconds : 10 ,
814+ InitialDelaySeconds : defaultInitialDelaySeconds ,
815+ PeriodSeconds : startupProbePeriodSeconds ,
809816 }
810817 }
811818
812819 if cr .Spec .OFEDDriver .LivenessProbe == nil {
813820 cr .Spec .OFEDDriver .LivenessProbe = & mellanoxv1alpha1.PodProbeSpec {
814- InitialDelaySeconds : 30 ,
815- PeriodSeconds : 30 ,
821+ InitialDelaySeconds : initialDelayStartupProbeSeconds ,
822+ PeriodSeconds : defaultPeriodSeconds ,
816823 }
817824 }
818825
819826 if cr .Spec .OFEDDriver .ReadinessProbe == nil {
820827 cr .Spec .OFEDDriver .ReadinessProbe = & mellanoxv1alpha1.PodProbeSpec {
821- InitialDelaySeconds : 10 ,
822- PeriodSeconds : 30 ,
828+ InitialDelaySeconds : defaultInitialDelaySeconds ,
829+ PeriodSeconds : defaultPeriodSeconds ,
823830 }
824831 }
825832}
0 commit comments