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 mountOptions for nfs persistent volume #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ To upgrade Sonatype IQ Server and ensure a successful data migration, the follow
| `iq_server.persistence.csi.volumeHandle` | Volume handle | `nil` |
| `iq_server.persistence.nfs.server` | NFS server hostname | `nil` |
| `iq_server.persistence.nfs.path` | NFS server path | `/` |
| `iq-server.persitence.nfs.mountOptions` | NFS server mount options | `nil` |
Copy link
Collaborator

Choose a reason for hiding this comment

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

(typo)

Suggested change
| `iq-server.persitence.nfs.mountOptions` | NFS server mount options | `nil` |
| `iq-server.persistence.nfs.mountOptions` | NFS server mount options | `nil` |

| `iq_server.podAnnotations` | Annotations for the Sonatype IQ Server pods | `nil` |
| `iq_server.serviceAccountName` | Sonatype IQ Server service account name | `default` |
| `iq_server.serviceType` | Sonatype IQ Server service type | `ClusterIP` |
Expand Down
6 changes: 6 additions & 0 deletions chart/templates/iq-server-pv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ spec:
readOnly: false
server: {{ .Values.iq_server.persistence.nfs.server }}
path: {{ .Values.iq_server.persistence.nfs.path }}
{{- if ((.Values.iq_server.persistence).nfs).mountOptions }}
{{- with .Values.iq_server.persistence.nfs.mountOptions }}
mountOptions:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- else if and ((.Values.iq_server.persistence).hostPath).path ((.Values.iq_server.persistence).hostPath).type }}
hostPath:
path: {{ .Values.iq_server.persistence.hostPath.path }}
Expand Down
9 changes: 9 additions & 0 deletions chart/tests/iq-server-pv_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ tests:
nfs:
server: "someServer"
path: "somePath"
mountOptions:
- "someValue1"
- "someValue2"
asserts:
- equal:
path: spec.nfs
Expand All @@ -205,6 +208,12 @@ tests:
server: "someServer"
path: "somePath"
documentIndex: 0
- equal:
path: spec.mountOptions
value:
- "someValue1"
- "someValue2"
documentIndex: 0

- it: can set hostPath
set:
Expand Down
1 change: 1 addition & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ iq_server:
nfs:
server:
path: "/"
mountOptions:

# The service account to use to run the pods/job
serviceAccountName: "default"
Expand Down