pravega / pravega-operator

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

Adding validation checks for Bookkeeper Deployments #598

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

When deploying the pravega cluster, the options bookkeeper.ensemble.size bookkeeper.write.quorum.size bookkeeper.ack.quorum.size should be set such that the following condition is satisfied: bookkeeper.ensemble.size >= bookkeeper.write.quorum.size >= bookkeeper.ack.quorum.size

Purpose of the change

Fixes #587

What the code does

The code preforms the following checks :

How to verify it

Install a pravega cluster with different values of bookkeeper.ensemble.size bookkeeper.write.quorum.size bookkeeper.ack.quorum.size and in case the above mentioned condition in not met , then an error is retuned by the validating webhook. In case the values adheres to the above condition say bookkeeper.ensemble.size=4 bookkeeper.write.quorum.size=3 bookkeeper.ack.quorum.size=3 then post installation of the pravega cluster if you go inside Controller/ Segment Store Pod then all these values should be available in the env variable JAVA_OPTS as

JAVA_OPTS=-Dbookkeeper.ack.quorum.size=3 -Dbookkeeper.ensemble.size=4 -Dbookkeeper.write.outstanding.bytes.max=33554432 -Dbookkeeper.write.quorum.size=3 -Dbookkeeper.write.timeout.milliseconds=60000 -Dcontroller.container.count=8 -Dcontroller.retention.bucket.count=4 -Dcontroller.retention.thread.count=4 -Dcontroller.service.asyncTaskPool.size=20

codecov-commenter commented 2 years ago

Codecov Report

Merging #598 (1823530) into master (e7af6d1) will increase coverage by 0.15%. The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #598      +/-   ##
==========================================
+ Coverage   74.88%   75.03%   +0.15%     
==========================================
  Files          16       16              
  Lines        4428     4479      +51     
==========================================
+ Hits         3316     3361      +45     
- Misses        978      984       +6     
  Partials      134      134              
Impacted Files Coverage Δ
pkg/apis/pravega/v1beta1/pravegacluster_types.go 33.11% <85.71%> (+2.50%) :arrow_up:
pkg/apis/pravega/v1beta1/pravega.go 98.88% <100.00%> (+0.05%) :arrow_up:

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 e7af6d1...1823530. Read the comment docs.