pravega / pravega-operator

Pravega Kubernetes Operator
Apache License 2.0
41 stars 38 forks source link

Issue 495: Validate Pravega manifest settings before deployment #584

Closed nishant-yt closed 2 years ago

nishant-yt commented 2 years ago

Signed-off-by: Nishant Gupta Nishant_Gupta3@dell.com

Change log description

While deploying Pravega , Segment Store settings should adhere to the following rules: POD_MEM_LIMIT > JVM Heap (-Xmx) + JVM Direct Memory (-XX:MaxDirectMemorySize) JVM Direct Memory > JVM Heap JVM Direct memory > Segment Store read cache size (pravegaservice.cache.size.max)

Here we are validating the above scenarios before deployment by the operator happens instead of manually relying on the user to set them right.

Purpose of the change

Fixes #495

What the code does

The code makes sure the following checks are performed by the operator before deploying Pravega: POD_MEM_LIMIT > JVM Heap + JVM Direct Memory JVM Direct Memory > JVM Heap JVM Direct memory > Segment Store read cache size

How to verify it

Try setting different values for .spec.pravega.segmentStoreResources.requests.memory , -Xmx , -XX:MaxDirectMemorySize and pravegaservice.cache.size.max and the operator should return error in case the above mentioned rules are not met.

codecov-commenter commented 2 years ago

Codecov Report

Merging #584 (d9dac1d) into master (7af939a) will decrease coverage by 0.71%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #584      +/-   ##
==========================================
- Coverage   74.17%   73.46%   -0.72%     
==========================================
  Files          16       16              
  Lines        4229     4270      +41     
==========================================
  Hits         3137     3137              
- Misses        962     1003      +41     
  Partials      130      130              
Impacted Files Coverage Δ
pkg/apis/pravega/v1beta1/pravegacluster_types.go 25.46% <0.00%> (-1.27%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7af939a...d9dac1d. Read the comment docs.