[CDAP-21096] Add support for startupProbe in CDAP master #127
+199
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CDAP-21096 Add support for startupProbe in CDAP master
Context
In addition to the rolling upgrade strategy, for high availability of APIs, startup probe need to be implemented to ensure that the CDAP service pods (eg. Appfabric) accepts requests only when the server has started.
CDAP services (eg. Appfabric) run on dynamic port and announces the port after the server has started. For this command probe can be configured to check the status of system service using the URL ‘/v3/system/services//status’.
CDAP services will write the port to a temp file in the container after startup. Here is a code snippet for startup probe using the port written to the temp file:
Change Description
StartupProbe
as an optional field in theCDAPServiceSpec
.StartupProbe
config of typecorev1.Probe
will be set to the container spec.controller-runtime/tools/setup-envtest
had to be increased from default 1.5 MB to 2.5 MB. This is due to the increase in size of generated CRD.Verification
make test