-
Notifications
You must be signed in to change notification settings - Fork 3
Persistent volume support #3
base: main
Are you sure you want to change the base?
Conversation
This ensures the commands will be executed in the expected order and that they'll wait for the previous command to run, so no race conditions. This also simplifies the code quite a bit.
Update the input-values.yaml config file to match what's in render_hcce.sh Generate a new key pair for the certificate. Only modify the common name for the certificate. Preprocess the input-values.yaml config file to replace the database username and password variables in PGRST_DB_URI and PSQL with their actual values. Skip saving out any of the keys or certificates and just use them directly where needed. Skip saving things in environment variables and just use them directly where needed. Add base64 encoded versions of the certificate and its private key to the config so that they can be transferred properly to the end hcce.yaml file. Fix the replacePlaceholders function so that it replaces all variables that have a corresponding entry in the config file, even if that entry's value is false.
Persistent volume settings can be configured in input-values.yaml, including whether they're generated or not. Persistent volumes are based off of the persistent_volumes.yam template file. The yaml library has been swapped out for one that will better preserve comments and formatting. Note: The commented out speelycaptor section isn't passed on when creating persistent volumes. We may want to think about stripping it out when not generating persistent volumes as well.
generate_script/index.js
Outdated
|
|
||
| function generatePersistentVolumes(processedConfig, replacedContent) { | ||
| if (processedConfig.KUBERNETES_PROVIDER === "DO") { | ||
| processedConfig.ACCESS_MODE = "ReadWriteMany"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Digital Ocean also uses ReadWriteOnce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay. I thought from your previous PR on the Hubs Cloud repo that ReadWriteMany was the way to go for DigitalOcean, but since that's not the case, I'll switch it to ReadWriteOnce. Are there any platform differences now or can remove this whole kubernetes provider thing?
|
Thanks a lot @Exairnous this is so awesome for people to have the persistent volume working, though the readWriteOnce is going to be universal |
|
You're welcome @hrithikwins ! The persistent volumes should automatically be attached to the hostPath when persistent volumes are used, unless there are more spots than the two I've accounted for? |
…erywhere. This addresses the feedback in hrithikwins#3
… default value of GENERATE_PERSISTENT_VOLUMES from true to Yes.
|
I've addressed the feedback, but I'm converting this to a draft for now while I wait for feedback from Geng about the commented out speelycaptor section. |
… consistent with the rest of the values in the input-values.yaml file.
While the yaml parser generally preserves comments, the whole document containing the comments in the yaml file is commented out, so it is skipped. This commit makes it so the comments are within a document and thus get preserved.
Depends on PR #2
Persistent volume settings can be configured in input-values.yaml, including whether they're generated or not.
Persistent volumes are based off of the persistent_volumes.yam template file.
The yaml library has been swapped out for one that will better preserve comments and formatting.
Note: The commented out speelycaptor section isn't passed on when creating persistent volumes. We may want to think about stripping it out when not generating persistent volumes as well.
I'm not too familiar with persistent volumes, so the template file and hcce.yaml should be checked to make sure everything's good.
It should be pretty easy to add other configuration options as desired.