diff --git a/keydb/Chart.yaml b/keydb/Chart.yaml index 54790da..8407ced 100644 --- a/keydb/Chart.yaml +++ b/keydb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: keydb description: A Helm chart for KeyDB multimaster setup type: application -version: 0.4.1 +version: 0.5.0 keywords: - keydb - redis diff --git a/keydb/README.md b/keydb/README.md index 718b9f7..bb47590 100644 --- a/keydb/README.md +++ b/keydb/README.md @@ -42,3 +42,5 @@ The following table lists the configurable parameters of the KeyDB chart and the | `persistentVolume.enabled` | Should PVC be created via volumeClaimTemplates | `true` | | `persistentVolume.accessModes` | Volume access modes | `[ReadWriteOnce]` | | `persistentVolume.size` | Size of the volume | `1Gi` | +| `resources` | K8s Resources for KeyDB containers | `{}` | +| `securityContext` | K8s SecurityContext for KeyDB pods | `{}` | diff --git a/keydb/templates/sts.yaml b/keydb/templates/sts.yaml index a4a7cdc..bb0ff77 100644 --- a/keydb/templates/sts.yaml +++ b/keydb/templates/sts.yaml @@ -37,12 +37,8 @@ spec: - name: keydb image: {{ .Values.image }} imagePullPolicy: {{ .Values.imagePullPolicy }} - volumeMounts: - - name: keydb-data - mountPath: /data - - name: utils - mountPath: /utils - readOnly: true + command: + - /utils/server.sh ports: - name: keydb containerPort: 6379 @@ -53,8 +49,16 @@ spec: readinessProbe: tcpSocket: port: keydb - command: - - /utils/server.sh + resources: +{{ toYaml .Values.resources | indent 10 }} + volumeMounts: + - name: keydb-data + mountPath: /data + - name: utils + mountPath: /utils + readOnly: true + securityContext: +{{ toYaml .Values.securityContext | indent 8 }} volumes: - name: utils configMap: @@ -67,8 +71,6 @@ spec: - name: keydb-data emptyDir: {} {{- end }} - resources: -{{ toYaml .Values.resources | indent 8 }} {{- if .Values.persistentVolume.enabled }} volumeClaimTemplates: - metadata: diff --git a/keydb/values.yaml b/keydb/values.yaml index d2e01d3..e9999b0 100644 --- a/keydb/values.yaml +++ b/keydb/values.yaml @@ -20,4 +20,13 @@ persistentVolume: - ReadWriteOnce size: 1Gi -resources: {} \ No newline at end of file +resources: {} + +# Please read https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls +# before sysctls setup +securityContext: {} + # sysctls: + # - name: net.core.somaxconn + # value: "512" + # - name: vm.overcommit_memory + # value: "1"