-
Notifications
You must be signed in to change notification settings - Fork 0
fix: persist config directory to retain users and tokens (#6) #8
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -460,3 +460,105 @@ tests: | |
| - contains: | ||
| path: spec.template.spec.containers[0].command | ||
| content: "-Darcadedb.server.defaultDatabases=Universe[admin:pwd]" | ||
|
|
||
| # ── config persistence ────────────────────────────────────────────────────── | ||
|
|
||
| - it: config persistence disabled by default — no config volumeMount or VCT | ||
| asserts: | ||
| - notContains: | ||
| path: spec.template.spec.containers[0].volumeMounts | ||
| content: | ||
| name: arcadedb-config | ||
| mountPath: /home/arcadedb/config | ||
| - notExists: | ||
| path: spec.volumeClaimTemplates[1] | ||
|
|
||
| - it: config persistence enabled renders volumeMount at configDirectory | ||
| set: | ||
| persistence.config.enabled: true | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].volumeMounts | ||
| content: | ||
| name: arcadedb-config | ||
| mountPath: /home/arcadedb/config | ||
|
|
||
| - it: config persistence enabled renders VolumeClaimTemplate for arcadedb-config | ||
| set: | ||
| persistence.config.enabled: true | ||
| asserts: | ||
| - contains: | ||
| path: spec.volumeClaimTemplates | ||
| content: | ||
| metadata: | ||
| name: arcadedb-config | ||
| spec: | ||
| accessModes: [ReadWriteOnce] | ||
| resources: | ||
| requests: | ||
| storage: 1Gi | ||
|
|
||
| - it: config persistence size override flows through | ||
| set: | ||
| persistence.config.enabled: true | ||
| persistence.config.size: 5Gi | ||
| asserts: | ||
| - equal: | ||
| path: spec.volumeClaimTemplates[1].spec.resources.requests.storage | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test assertions use hardcoded indices (e.g., - contains:
path: spec.volumeClaimTemplates
content:
metadata:
name: arcadedb-config
spec:
resources:
requests:
storage: 5Gi |
||
| value: 5Gi | ||
|
|
||
| - it: config persistence storageClass override flows through | ||
| set: | ||
| persistence.config.enabled: true | ||
| persistence.config.storageClass: fast-ssd | ||
| asserts: | ||
| - equal: | ||
| path: spec.volumeClaimTemplates[1].spec.storageClassName | ||
| value: fast-ssd | ||
|
|
||
| - it: config persistence accessMode override flows through | ||
| set: | ||
| persistence.config.enabled: true | ||
| persistence.config.accessMode: ReadWriteMany | ||
| asserts: | ||
| - equal: | ||
| path: spec.volumeClaimTemplates[1].spec.accessModes[0] | ||
| value: ReadWriteMany | ||
|
|
||
| - it: arcadedb.configDirectory override flows through to config volumeMount mountPath | ||
| set: | ||
| persistence.config.enabled: true | ||
| arcadedb.configDirectory: /custom/config | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].volumeMounts | ||
| content: | ||
| name: arcadedb-config | ||
| mountPath: /custom/config | ||
|
|
||
| - it: config VCT is second entry after data VCT when both persistence flags enabled | ||
| set: | ||
| persistence.config.enabled: true | ||
| asserts: | ||
| - equal: | ||
| path: spec.volumeClaimTemplates[0].metadata.name | ||
| value: arcadedb-data | ||
| - equal: | ||
| path: spec.volumeClaimTemplates[1].metadata.name | ||
| value: arcadedb-config | ||
|
|
||
| - it: config persistence enabled with data persistence disabled still renders config VCT | ||
| set: | ||
| persistence.enabled: false | ||
| persistence.config.enabled: true | ||
| asserts: | ||
| - contains: | ||
| path: spec.volumeClaimTemplates | ||
| content: | ||
| metadata: | ||
| name: arcadedb-config | ||
| spec: | ||
| accessModes: [ReadWriteOnce] | ||
| resources: | ||
| requests: | ||
| storage: 1Gi | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
mountPathis configurable via.Values.arcadedb.configDirectory, but the ArcadeDB process is not informed of this custom path in thecommandsection. If a user overrides this value, the volume will be mounted at the new path, but the application will still look for configuration in the default/home/arcadedb/configdirectory. To support custom paths, the-Darcadedb.server.configurationDirectoryproperty should be added to the container's command intemplates/statefulset.yaml.