Skip to content

Commit

Permalink
feat: add persistentVolumeClaimSpec to arangodb resources (#101)
Browse files Browse the repository at this point in the history
* feat: add `persistentVolumeClaimSpec` to arangodb resources

resolved #100

* chore(ci):  update workflows to work 😉

* chore(ci):  update helm-docs workflows to latest and added pre-commit-hook
  • Loading branch information
sebbrandt87 authored Nov 26, 2023
1 parent 33d688e commit 73e2ada
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 25 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/k8s-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.8.1

- uses: engineerd/[email protected]
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ jobs:
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.8.1

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
uses: helm/chart-releaser-action@v1.6.0
with:
charts_dir: someengineering
charts_repo_url: https://helm.some.engineering
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/validate-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ jobs:

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.8.1

- uses: supplypike/setup-bin@v1
with:
uri: 'https://github.com/norwoodj/helm-docs/releases/download/v1.11.0/helm-docs_1.11.0_Linux_x86_64.tar.gz'
uri: 'https://github.com/norwoodj/helm-docs/releases/download/v1.11.3/helm-docs_1.11.3_Linux_x86_64.tar.gz'
name: 'helm-docs'
version: '1.11.0'
version: '1.11.3'

- name: generate & compare documentation
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/validate-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ jobs:

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.9.2

- uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Set up chart testing
uses: helm/chart-testing-action@v2.4.0
uses: helm/chart-testing-action@v2.6.1

- name: Check changes in chart
id: list-changed
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: ""
hooks:
- id: helm-docs-container
entry: jnorwood/helm-docs:1.11.3
args:
# Make the tool search for charts only under the `charts` directory
- --chart-search-root=someengineering
6 changes: 3 additions & 3 deletions someengineering/resoto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A Helm chart for Kubernetes
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Configure node affinity for all pods. |
| arangodb | object | `{"operator":{"deployment":{"externalAccessType":"None","mode":"Single","spec":{},"tlsCASecretName":"None"},"enabled":false,"replicaCount":1},"persistentVolumeSize":"50Gi","version":"3.10.4"}` | Install ArangoDB operator as dependency. |
| arangodb | object | `{"operator":{"deployment":{"externalAccessType":"None","mode":"Single","spec":{},"tlsCASecretName":"None"},"enabled":false,"replicaCount":1},"persistentVolumeClaimSpec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"50Gi"}}},"version":"3.10.4"}` | Install ArangoDB operator as dependency. |
| arangodb.operator | object | `{"deployment":{"externalAccessType":"None","mode":"Single","spec":{},"tlsCASecretName":"None"},"enabled":false,"replicaCount":1}` | See: https://www.arangodb.com/docs/stable/deployment-kubernetes-helm.html#configurable-values-for-arangodb-kubernetes-operator for a list of possible configuration values. |
| arangodb.operator.deployment | object | `{"externalAccessType":"None","mode":"Single","spec":{},"tlsCASecretName":"None"}` | Defines the ArangoDB deployment and database. |
| arangodb.operator.deployment.externalAccessType | string | `"None"` | Should the database externally accessible. https://www.arangodb.com/docs/stable/deployment-kubernetes-deployment-resource.html#specexternalaccesstype-string |
Expand All @@ -38,7 +38,7 @@ A Helm chart for Kubernetes
| arangodb.operator.deployment.tlsCASecretName | string | `"None"` | Secret name that holds the ArangoDB certificate authority. |
| arangodb.operator.enabled | bool | `false` | The ArangoDB operator is helpful for more complex deployments. Default is disabled, while a single instance database deployment is performed. |
| arangodb.operator.replicaCount | int | `1` | Replication count for Operator deployment. |
| arangodb.persistentVolumeSize | string | `"50Gi"` | The size of the volume for the database data. |
| arangodb.persistentVolumeClaimSpec | object | `{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"50Gi"}}}` | The size of the volume for the database data. |
| arangodb.version | string | `"3.10.4"` | The version of ArangoDB to use. |
| fullnameOverride | string | `""` | In case you want to override the generated fully qualified application name. |
| image | object | `{"tag":""}` | Image tag used for all resoto components. |
Expand Down Expand Up @@ -107,4 +107,4 @@ A Helm chart for Kubernetes
| tolerations | list | `[]` | Configure toleration's for all pods. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
6 changes: 3 additions & 3 deletions someengineering/resoto/templates/arango-db-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ spec:
{{. | toYaml | nindent 2}}
{{- end}}
{{ .Values.arangodb.operator.deployment.mode | lower}}:
resources:
requests:
storage: {{ .Values.arangodb.persistentVolumeSize }}
volumeClaimTemplate:
spec: # https://docs.arangodb.com/3.11/deploy/kubernetes/deployment-resource-reference/#specgroupvolumeclaimtemplatespec-persistentvolumeclaimspec
{{ toYaml .Values.arangodb.persistentVolumeClaimSpec | nindent 8 }}
externalAccess:
type: {{ .Values.arangodb.operator.deployment.externalAccessType }}
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ metadata:
finalizers:
- kubernetes.io/pvc-protection
name: graphdb-server-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{.Values.arangodb.persistentVolumeSize}}
spec:
{{ toYaml .Values.arangodb.persistentVolumeClaimSpec | nindent 2 }}
{{- end }}
8 changes: 7 additions & 1 deletion someengineering/resoto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ arangodb:
# -- The version of ArangoDB to use.
version: "3.10.4"
# -- The size of the volume for the database data.
persistentVolumeSize: "50Gi"
persistentVolumeClaimSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
# storageClassName: default

# -- See: https://www.arangodb.com/docs/stable/deployment-kubernetes-helm.html#configurable-values-for-arangodb-kubernetes-operator for a list of possible configuration values.
operator:
Expand Down

0 comments on commit 73e2ada

Please sign in to comment.