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

add custom partitions, allow numbered directories for subPath for multiple nodes #25

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

henokgetachew
Copy link
Contributor

@henokgetachew henokgetachew commented Oct 2, 2024

  • Allow customizing partition,
  • Support sequentially numbered directories for clustered setup (i.e. Node1 can have subPath: srv1 while node2 can have subPath: srv2. The subPath config would be saved as srv%d in the values. The code replaces %d with the node number.

@henokgetachew henokgetachew changed the title Custom partitions, Numbered directories for subPath add custom partitions, allow numbered directories for subPath Oct 2, 2024
@henokgetachew henokgetachew changed the title add custom partitions, allow numbered directories for subPath add custom partitions, allow numbered directories for subPath for multiple nodes Oct 3, 2024
Copy link
Member

@Hareet Hareet left a comment

Choose a reason for hiding this comment

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

Let's get it in there!

Some clarification around scenarios that use numbered directories for subPath and we could write that note about which scenario in values.

Comment on lines +87 to +88
{{- if $.Values.couchdb_data.dataPathOnDiskForCouchDB }}
subPath: {{ if contains "%d" $.Values.couchdb_data.dataPathOnDiskForCouchDB }}
Copy link
Member

Choose a reason for hiding this comment

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

I believe this also parses data%directory and may mess up the setup if data%directory is provided and is a valid name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While it's technically allowed to use that as a directory name in linux, it's generally recommended to stick to more standard naming conventions like letters (a-z, A-Z), numbers (0-9), underscore (_), and hyphen (-). Avoiding spaces and special characters. We'll validate against special characters in directory names and passwords, user name etc when adding validation features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also making a note that across projects these are generally named like:
data or /srv/storage/medic-core/couchdb/data. The support we're introducing now is for when people setup clustered setup with k3s or docker-compose and have named the directories for individual couchdbs like /srv1/couchdb/data (For couchdb1), srv2/couchdb/data (For couchdb2) and srv3/couchdb/data (For couchdb3).

@henokgetachew
Copy link
Contributor Author

I will add detailed notes about scenarios.

@henokgetachew henokgetachew merged commit aebb579 into main Oct 4, 2024
1 check passed
@henokgetachew henokgetachew deleted the custom-partitions-for-cht branch October 4, 2024 08:56
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