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

Use PV and PVC backed volumes to store application charts #1352

Closed
devdattakulkarni opened this issue Sep 10, 2024 · 7 comments
Closed

Use PV and PVC backed volumes to store application charts #1352

devdattakulkarni opened this issue Sep 10, 2024 · 7 comments

Comments

@devdattakulkarni
Copy link
Contributor

Application charts are stored on local file system (on the path /) of helmer and kubeconfiggenerator.
See below for a reference:

https://github.com/cloud-ark/kubeplus/blob/master/plugins/kubectl-upload-chart#L14-#L15

The corresponding volumes of helmer and kubeconfiggenerator are not persistent. If KubePlus Pod is recreated (for instance, when KubePlus is updated), the charts stored on this local volumes of the Pod are lost. We should use a PVC backed volume with helmer and kubeconfiggenerator for storing the chart.

@devdattakulkarni
Copy link
Contributor Author

We should mark such a PVC with the following:

helm.sh/resource-policy: "keep"

@devdattakulkarni
Copy link
Contributor Author

devdattakulkarni commented Nov 27, 2024

Let's mount the PVC on the path: /kubeplus

Following changes will be required after this:

@devdattakulkarni
Copy link
Contributor Author

@SuyogShinde942 ^^

@devdattakulkarni
Copy link
Contributor Author

Carefully go through the code in kubeconfiggenerator.py and helmer/main.go to see if we are not missing any place where we will need to update the chart location.

@SuyogShinde942
Copy link
Contributor

Thank you, I'll be working on this issue. Will let you know if any doubts.

@devdattakulkarni
Copy link
Contributor Author

devdattakulkarni commented Dec 3, 2024

For testing whether PV works as expected, here are the steps:

  1. Deploy KubePlus with a version (say, 4.0.0)
  2. Register HelloWorldService CRD. Use the localchart option. This will require uploading the hello-world chart to KubePlus
  3. Create an instance of HelloWorldService
  4. Use helm upgrade command to upgrade KubePlus release to version 4.0.1
  5. Once new KubePlus Pod is RUNNING, exec into the helmer container and check "/chart" folders. Inside "/chart", there should be expanded hello-world chart
  6. Create another instance of HelloWorldService

If steps 5 and 6 are successful then it will mean that PV and PVC worked as expected. This is because, even though KubePlus Pod is newely created, its file system is not affected.

@SuyogShinde942
Copy link
Contributor

#1378

I have created a PR for the above request, Please let me know if any changes are needed

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

No branches or pull requests

2 participants