You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to create a very basic redis cluster. To do this, I applied the below YAML file. Note that the livenessProbe and readinessProbe are left unspecified.
By querying YAML spec of pods, I expect to see that their livenessProbe and readinessProbe are set to the claimed default value as specified in the CRD. I expect to see the following default values.
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
What did you see instead?
The pods have the following default value for probes:
failureThreshold: 5
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 5
initialDelaySeconds: 15
Possible root cause and Suggested Fix
The default values for livenessProbe and readinessProbe are assigned in generateContainerDef from which the default values are from the return value of getProbeInfo. However, getProbeInfo's return value is inconsistent with the CRD.
If it is intended behavior that the operator override Kubernetes' default probing configuration, we think it is important that the operator check for min and max values for a specific field, because otherwise kubernetes would override the operator's default value.
For example, the operator's default value for periodSeconds is 15. If we submit periodSeconds: 0, since the lower limit is 1, the value are expected be overridden by the default value, which is 15. However, since operator does not realize that 0 is smaller than the lower limit and submits the value to kubernetes, the value will be defaulted to 10, which is the kubernetes-defined default value.
In addition, we suggest that CRD be modified to reflect the true default values for the probing fields.
The text was updated successfully, but these errors were encountered:
We found that Liveness/Readiness Probe's default values are inconsistent as what is stated in documentation and Custom Resource Definition.
What version of redis operator are you using?
redis-operator version: We are using redis-operator built from the
HEAD
Does this issue reproduce with the latest release?
Yes, it reproduces with
quay.io/opstree/redis-operator:v0.10.0
What operating system and processor architecture are you using (
kubectl version
)?kubectl version
OutputWhat did you do?
I tried to create a very basic redis cluster. To do this, I applied the below YAML file. Note that the
livenessProbe
andreadinessProbe
are left unspecified.What did you expect to see?
By querying YAML spec of pods, I expect to see that their
livenessProbe
andreadinessProbe
are set to the claimed default value as specified in the CRD. I expect to see the following default values.What did you see instead?
The pods have the following default value for probes:
Possible root cause and Suggested Fix
The default values for
livenessProbe
andreadinessProbe
are assigned in generateContainerDef from which the default values are from the return value of getProbeInfo. However,getProbeInfo
's return value is inconsistent with the CRD.If it is intended behavior that the operator override Kubernetes' default probing configuration, we think it is important that the operator check for min and max values for a specific field, because otherwise kubernetes would override the operator's default value.
For example, the operator's default value for
periodSeconds
is 15. If we submitperiodSeconds: 0
, since the lower limit is 1, the value are expected be overridden by the default value, which is 15. However, since operator does not realize that 0 is smaller than the lower limit and submits the value to kubernetes, the value will be defaulted to 10, which is the kubernetes-defined default value.In addition, we suggest that CRD be modified to reflect the true default values for the probing fields.
The text was updated successfully, but these errors were encountered: