Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 518: Add suport of configurable extra volume mounts #517

Merged

Conversation

CraneShiEMC
Copy link
Contributor

@CraneShiEMC CraneShiEMC commented Mar 21, 2021

Change log description

  • introduces the hostPathVolumeMounts and emptyDirVolumeMounts options as multiple key-value pairs, separated by commas and each consisting of a <name>=<path> tuple.
  • parses the hostPathVolumeMounts and emptyDirVolumeMounts values.
  • adds the extracted values to the volumes list and containers' volumeMounts list.

Purpose of the change

Implements #518

Pravega operator should allow to specify "extra" volumes to be mounted into pravega pods, including pravega segment store pods and pravega controller pods. Such volumes may be used to share data between the hosts and containers.

What the code does

The code implements the new pravega options: hostPathVolumeMounts and emptyDirVolumeMounts.
To use "extra" volumes in the pravega pods, in the Pravega options, specify:

  • hostPathVolumeMounts to add hostPath volumes
  • emptyDirVolumeMounts to add emptyDir volumes

The options consist of multiple key-value pairs, separated by commas and each consisting of a <name>=<path> tuple:

<name> is a volume name, the file or directory.
<path> is where the volume is mounted in the container.
For example, emptyDirVolumeMounts: "heap-dump=/tmp/dumpfile/heap,log=/opt/pravega/logs"

How to verify it

  1. Add the emptyDirVolumeMounts option to Pravega options parameter, e.g., emptyDirVolumeMounts: "heap-dump=/tmp/dumpfile/heap,log=/opt/pravega/logs".
  2. When the pravega cluster is deployed and ready, make sure that the the volumes list and containers' volumeMounts list has contained the emptyDir volumes and mounts specified in the emptyDirVolumeMounts.

The function has worked as expected on the deployed pravega cluster in our environment.

@codecov-io
Copy link

Codecov Report

Merging #517 (6616cc7) into master (c608b78) will decrease coverage by 1.24%.
The diff coverage is 37.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #517      +/-   ##
==========================================
- Coverage   71.75%   70.51%   -1.25%     
==========================================
  Files          15       15              
  Lines        3477     3564      +87     
==========================================
+ Hits         2495     2513      +18     
- Misses        874      931      +57     
- Partials      108      120      +12     
Impacted Files Coverage Δ
pkg/controller/pravega/pravega_segmentstore.go 91.62% <35.84%> (-8.38%) ⬇️
pkg/controller/pravega/pravega_controller.go 86.29% <38.18%> (-13.71%) ⬇️
pkg/controller/pravegacluster/upgrade.go 71.09% <0.00%> (-0.19%) ⬇️
pkg/apis/pravega/v1beta1/pravega.go 97.80% <0.00%> (+0.07%) ⬆️

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 c608b78...6616cc7. Read the comment docs.

@CraneShiEMC CraneShiEMC force-pushed the feature-add-extra-volume-mounts branch from 6616cc7 to 42425bd Compare March 23, 2021 09:20
@CraneShiEMC CraneShiEMC changed the title Add suport of extra volume mounts to be configured Issue #518: Add suport of extra volume mounts to be configured Mar 23, 2021
@CraneShiEMC CraneShiEMC changed the title Issue #518: Add suport of extra volume mounts to be configured Issue 518: Add suport of extra volume mounts to be configured Mar 23, 2021
@CraneShiEMC CraneShiEMC changed the title Issue 518: Add suport of extra volume mounts to be configured Issue 518: Add suport of configurable extra volume mounts Mar 24, 2021
Copy link
Contributor

@anishakj anishakj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anishakj anishakj merged commit 4027af3 into pravega:master Mar 24, 2021
CraneShiEMC added a commit to CraneShiEMC/pravega-operator that referenced this pull request Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants