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

Allow custom mount points to be added to vertica #89

Merged
merged 2 commits into from
Oct 29, 2021

Conversation

spilchen
Copy link
Collaborator

This adds the ability to add custom volume mounts to the Vertica container. A new spec.volumeMounts parameter was added to achieve this. It works alongside the spec.volumes parameter.

Here is an example that mounts the path /tenants in the Vertica container using an existing PVC.

apiVersion: vertica.com/v1beta1
kind: VerticaDB
metadata:
  name: verticadb-sample
spec:
  communal:
    ...
  subclusters:
  - name: sc1
  volumeMounts:
  - mountPath: /tenants
    name: tenants
  volumes:
  - name: tenants
    persistentVolumeClaim:
      claimName: vertica-pvc

The volumeMounts parameter takes the standard set of options for volume mounts (e.g. same as pod.spec.containers.volumeMounts).

The mount path for the new volume mount cannot conflict with any existing. The webhook was updated to detect any conflicts.

To avoid a circular dependency with the imports, I had to move a few helper functions in the paths package to api/v1beta1.

@spilchen spilchen merged commit 94a5009 into vertica:main Oct 29, 2021
@spilchen spilchen deleted the custom-vol-mounts branch October 29, 2021 18:24
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.

1 participant