@@ -100,6 +100,13 @@ const (
100100 defaultDriversInventoryPath = "/mnt/drivers-inventory"
101101)
102102
103+ const (
104+ defaultInitialDelaySeconds = 10
105+ defaultPeriodSeconds = 30
106+ startupProbePeriodSeconds = 10
107+ initialDelayStartupProbeSeconds = 30
108+ )
109+
103110// CertConfigPathMap indicates standard OS specific paths for ssl keys/certificates.
104111// Where Go looks for certs: https://golang.org/src/crypto/x509/root_linux.go
105112// Where OCP mounts proxy certs on RHCOS nodes:
@@ -800,22 +807,22 @@ func (e envVarsWithGet) Get(name string) *v1.EnvVar {
800807func setProbesDefaults (cr * mellanoxv1alpha1.NicClusterPolicy ) {
801808 if cr .Spec .OFEDDriver .StartupProbe == nil {
802809 cr .Spec .OFEDDriver .StartupProbe = & mellanoxv1alpha1.PodProbeSpec {
803- InitialDelaySeconds : 10 ,
804- PeriodSeconds : 10 ,
810+ InitialDelaySeconds : defaultInitialDelaySeconds ,
811+ PeriodSeconds : startupProbePeriodSeconds ,
805812 }
806813 }
807814
808815 if cr .Spec .OFEDDriver .LivenessProbe == nil {
809816 cr .Spec .OFEDDriver .LivenessProbe = & mellanoxv1alpha1.PodProbeSpec {
810- InitialDelaySeconds : 30 ,
811- PeriodSeconds : 30 ,
817+ InitialDelaySeconds : initialDelayStartupProbeSeconds ,
818+ PeriodSeconds : defaultPeriodSeconds ,
812819 }
813820 }
814821
815822 if cr .Spec .OFEDDriver .ReadinessProbe == nil {
816823 cr .Spec .OFEDDriver .ReadinessProbe = & mellanoxv1alpha1.PodProbeSpec {
817- InitialDelaySeconds : 10 ,
818- PeriodSeconds : 30 ,
824+ InitialDelaySeconds : defaultInitialDelaySeconds ,
825+ PeriodSeconds : defaultPeriodSeconds ,
819826 }
820827 }
821828}
0 commit comments