Skip to content

Conversation

@ssoriche
Copy link
Contributor

@ssoriche ssoriche commented May 2, 2025

Remove the use of NFS storage by creating a sidecar container that updates the git repo in a 15m loop. By having a sidecar container, it removes the need for NFS storage as sharing the volume is not required nor the use of ReadWriteMany.

  • conf(grep): Remove cronjob
  • conf(grep): Add repo-refresh container
  • conf(grep): switch to do-block-storage
@ranguard
Copy link
Member

ranguard commented May 2, 2025

Oh, so because gitrepo volume is ReadWriteOnce on a NODE it means you can share it across containers as read/write... as long as the containers are all on the same node... other than replicas: 1 is the some config which is enforcing this.. or does it magically work that out somehow?

Copy link
Member

@ranguard ranguard left a comment

Choose a reason for hiding this comment

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

I notice that readOnly: false is set on one container, should it be on all of them?

Please see other comment about how the system knows to run all of these containers on the same node.

Approving still

ssoriche added 3 commits May 4, 2025 10:24
Switching to a container that runs in a loop instead of a cronjob. This allows the sharing of the volume without requiring an NFS mount.
The repo-refresh container runs the git update on a 15 minute cycle. This allows the sharing of the PVC without requiring NFS.
Now with the sidecar container that updates the grep repository exists in the same pod, we can remove the NFS storage and use do-block-storage directly.
@ssoriche
Copy link
Contributor Author

ssoriche commented May 4, 2025

Oh, so because gitrepo volume is ReadWriteOnce on a NODE it means you can share it across containers as read/write... as long as the containers are all on the same node... other than replicas: 1 is the some config which is enforcing this.. or does it magically work that out somehow?

The PVC is tied to the pod directly and because the containers exist in the same pod, they all have access to it.

@ssoriche
Copy link
Contributor Author

ssoriche commented May 4, 2025

I notice that readOnly: false is set on one container, should it be on all of them?

Please see other comment about how the system knows to run all of these containers on the same node.

Approving still

Ideally only the one container is writing to the volume and the others should only be reading it.

@ssoriche ssoriche merged commit e0af31a into main May 4, 2025
@ssoriche ssoriche deleted the ssoriche/grep branch May 4, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants