Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Conversation

@Exairnous
Copy link
Contributor

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.

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.

function generatePersistentVolumes(processedConfig, replacedContent) {
if (processedConfig.KUBERNETES_PROVIDER === "DO") {
processedConfig.ACCESS_MODE = "ReadWriteMany";
Copy link
Owner

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

Copy link
Owner

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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?

@hrithikwins
Copy link
Owner

Thanks a lot @Exairnous this is so awesome for people to have the persistent volume working, though the readWriteOnce is going to be universal
And the persistent volume once created has to be attached to the hostPath in the respective deployments

@Exairnous
Copy link
Contributor Author

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?

@Exairnous Exairnous marked this pull request as draft August 17, 2024 06:52
@Exairnous
Copy link
Contributor Author

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants