-
Bug
-
Resolution: Done
-
Normal
-
None
-
4.13
-
Moderate
-
None
-
Sprint 228
-
1
-
Rejected
-
False
-
-
-
Bug Fix
-
Done
Description of problem
In OpenShift 4.7.0 and 4.6.20, cluster-ingress-operator started using the OpenShift-specific unsupported.do-not-use.openshift.io/override-liveness-grace-period-seconds annotation for router pods as a short-term measure to configure the liveness probe's grace period in order to fix OCPBUGSM-20760 (BZ#1899941). This annotation is implemented by a carry patch in openshift/kubernetes.
Since then, upstream Kubernetes has added a terminationGracePeriodSeconds API field to configure the liveness probe using a formal API (upstream doc reference). Using this API field will allow for the carry patch to be removed from openshift/kubernetes.
Example:
spec: terminationGracePeriodSeconds: 3600 # pod-level containers: - name: test image: ... ports: - name: liveness-port containerPort: 8080 hostPort: 8080 livenessProbe: httpGet: path: /healthz port: liveness-port failureThreshold: 1 periodSeconds: 60 # Override pod-level terminationGracePeriodSeconds # terminationGracePeriodSeconds: 10
Version-Release number of selected component (if applicable)
OpenShift 4.13.
How reproducible
Always.
Steps to Reproduce
1. Check the annotation and API field on a running cluster: oc -n openshift-ingress get pods -Lingresscontroller.operator.openshift.io/deployment-ingresscontroller=default -o 'custom-columns=NAME:.medadata.name,ANNOTATION:.metadata.annotations.unsupported\.do-not-use\.openshift\.io\/override-liveness-grace-period-seconds,SPEC:.spec.containers[0].livenessProbe.terminationGracePeriodSeconds'
Actual results
The annotation is set, and the spec field is not:
% oc -n openshift-ingress get pods -Lingresscontroller.operator.openshift.io/deployment-ingresscontroller=default -o 'custom-columns=NAME:.metadata.name,ANNOTATION:.metadata.annotations.unsupported\.do-not-use\.openshift\.io\/override-liveness-grace-period-seconds,SPEC:.spec.containers[0].livenessProbe.terminationGracePeriodSeconds' NAME ANNOTATION SPEC router-default-677f956f8b-d5lqz 10 <none> router-default-677f956f8b-hntbb 10 <none>
Expected results
The annotation is not set, and the spec field is:
% oc -n openshift-ingress get pods -Lingresscontroller.operator.openshift.io/deployment-ingresscontroller=default -o 'custom-columns=NAME:.metadata.name,ANNOTATION:.metadata.annotations.unsupported\.do-not-use\.openshift\.io\/override-liveness-grace-period-seconds,SPEC:.spec.containers[0].livenessProbe.terminationGracePeriodSeconds' NAME ANNOTATION SPEC router-default-677f956f8b-d5lqz <none> 10 router-default-677f956f8b-hntbb <none> 10