Persistent volumes are created dynamically, w/ default storageClass #363
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hostPath volumes are labeled a "dangerous escape hatch" in the documentation, and will be discarded if there is ever a second node. There are several mechanism where this may happen, even for a "single-node" cluster, such as when the version of Kubernetes is upgraded by spinning up a new node, then draining and spinning down the old.
This PR creates volumes
It also creates the pgsql volume with accessMode ReadWriteOncePod. If someone ever tries to scale up the pgsql deployment, this will ensure only one PostgresQL engine can access the files. (ReadWriteOnce allows all pods on the node to access the volume.)
It also tweaks the mountPath for PostgresQL so it's not creating files and directories at the root of the volume, so PostresQL doesn't balk at the presence of a
lost+found
directory.It also removes the duplicate Secret.
This PR has been tested on Digital Ocean; it would be desirable to validate it on another provider.