From 934b01e1702039094ef8177c2b8ae6389fcbb416 Mon Sep 17 00:00:00 2001 From: Anders Nierhoff Date: Mon, 12 Aug 2024 12:32:30 +0200 Subject: [PATCH] Add posibility for custom volumes --- README.md | 2 ++ README.md.tpl | 2 ++ templates/statefulset.yaml | 6 ++++++ values.schema.json | 33 +++++++++++++++++++++++++++++++++ values.schema.json.tpl | 33 +++++++++++++++++++++++++++++++++ values.yaml | 8 ++++++++ 6 files changed, 84 insertions(+) diff --git a/README.md b/README.md index 9945aa6..e9cfbc2 100644 --- a/README.md +++ b/README.md @@ -52,4 +52,6 @@ Configure your Infinispan cluster by specifying values in the `deploy.*` section | `deploy.securityContext` | Defines the securityContext settings used by the cluster's StatefulSet | `{}` | - | | `deploy.ssl.endpointSecretName` | Specifies the name of the secret that contains certificate for endpoint encryption | `""` | - | | `deploy.ssl.transportSecretName` | Specifies the name of the secret that contains certificate for transport encryption | `""` | - | +| `deploy.volumeMounts` | Add custome volume mounts to infinispan | `[]` | - | +| `deploy.volumes` | Add custome volumes to infinispan | `[]` | - | | `deploy.infinispan` | Infinispan Server configuration. | - | You should not change the default socket bindings or the security realm and endpoints named "metrics". Modifying these default properties can result in unexpected behavior and loss of service. | diff --git a/README.md.tpl b/README.md.tpl index 352d7ec..780747f 100644 --- a/README.md.tpl +++ b/README.md.tpl @@ -52,4 +52,6 @@ Configure your {brandname} cluster by specifying values in the `deploy.*` sectio | `deploy.securityContext` | Defines the securityContext settings used by the cluster's StatefulSet | `{}` | - | | `deploy.ssl.endpointSecretName` | Specifies the name of the secret that contains certificate for endpoint encryption | `""` | - | | `deploy.ssl.transportSecretName` | Specifies the name of the secret that contains certificate for transport encryption | `""` | - | +| `deploy.volumeMounts` | Add custome volume mounts to infinispan | `[]` | - | +| `deploy.volumes` | Add custome volumes to infinispan | `[]` | - | | `deploy.infinispan` | {brandname} Server configuration. | - | You should not change the default socket bindings or the security realm and endpoints named "metrics". Modifying these default properties can result in unexpected behavior and loss of service. | diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index fb19b9b..9c2e908 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -149,6 +149,9 @@ spec: - mountPath: "/etc/encrypt/endpoint" name: "encrypt-volume" {{- end }} + {{- with .Values.deploy.volumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} volumes: - configMap: name: {{ printf "%s-configuration" (include "infinispan-helm-charts.name" .) }} @@ -170,6 +173,9 @@ spec: - name: data-volume emptyDir: { } {{- end }} + {{- with .Values.deploy.volumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.deploy.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/values.schema.json b/values.schema.json index 22791c0..7accf8c 100644 --- a/values.schema.json +++ b/values.schema.json @@ -422,6 +422,39 @@ "null" ] }, + "volumeMounts": { + "description": "Add custome volume mounts to infinispan", + "items": { + "properties": { + "name": { + "type": "string" + }, + "mountPath": { + "type": "string" + } + }, + "additionalProperties": true + }, + "type": [ + "array", + "null" + ] + }, + "volumes": { + "description": "Add custome volumes to infinispan", + "items": { + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": true + }, + "type": [ + "array", + "null" + ] + }, "infinispan": { "description": "Infinispan cluster configuration", "type": [ diff --git a/values.schema.json.tpl b/values.schema.json.tpl index 4b927bc..262fa12 100644 --- a/values.schema.json.tpl +++ b/values.schema.json.tpl @@ -422,6 +422,39 @@ "null" ] }, + "volumeMounts": { + "description": "Add custome volume mounts to infinispan", + "items": { + "properties": { + "name": { + "type": "string" + }, + "mountPath": { + "type": "string" + } + }, + "additionalProperties": true + }, + "type": [ + "array", + "null" + ] + }, + "volumes": { + "description": "Add custome volumes to infinispan", + "items": { + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": true + }, + "type": [ + "array", + "null" + ] + }, "infinispan": { "description": "Infinispan cluster configuration", "type": [ diff --git a/values.yaml b/values.yaml index 4b079ea..721fe73 100644 --- a/values.yaml +++ b/values.yaml @@ -102,6 +102,14 @@ deploy: securityContext: {} + volumeMounts: [] + # - name: logs + # mountPath: /logs + + volumes: [] + # - name: logs + # emptyDir: {} + ssl: endpointSecretName: "" transportSecretName: ""