mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 20:53:52 +09:00
Add a managed Valkey service mirroring the managed Redis app. Valkey is the BSD-3-Clause, Linux Foundation-governed fork of Redis 7.2 and a drop-in replacement for it, offered as a governance-clean alternative to the now source-available (AGPLv3/SSPL/RSALv2) Redis 8.x. Valkey runs on the same Spotahome redis-operator: the operator hardcodes the redis-server command and redis-cli in its (non-overridable) probe scripts, so the chart deploys a thin compat image (FROM valkey/valkey:<ver>) that adds the redis-* symlinks over the official upstream binaries — no Valkey code rebuilt. Versions offered: v8 (8.1.8, default) and v7 (7.2.13, the BSD Redis 7.2 line). Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <andrei.kvapil@aenix.io>
50 lines
1.7 KiB
Smarty
50 lines
1.7 KiB
Smarty
{{/*
|
|
Copyright Broadcom, Inc. All Rights Reserved.
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
*/}}
|
|
|
|
{{/* vim: set filetype=mustache: */}}
|
|
|
|
{{/*
|
|
Return a resource request/limit object based on a given preset.
|
|
These presets are for basic testing and not meant to be used in production
|
|
{{ include "resources.preset" (dict "type" "nano") -}}
|
|
*/}}
|
|
{{- define "resources.preset" -}}
|
|
{{- $presets := dict
|
|
"nano" (dict
|
|
"requests" (dict "cpu" "100m" "memory" "128Mi" "ephemeral-storage" "50Mi")
|
|
"limits" (dict "memory" "128Mi" "ephemeral-storage" "2Gi")
|
|
)
|
|
"micro" (dict
|
|
"requests" (dict "cpu" "250m" "memory" "256Mi" "ephemeral-storage" "50Mi")
|
|
"limits" (dict "memory" "256Mi" "ephemeral-storage" "2Gi")
|
|
)
|
|
"small" (dict
|
|
"requests" (dict "cpu" "500m" "memory" "512Mi" "ephemeral-storage" "50Mi")
|
|
"limits" (dict "memory" "512Mi" "ephemeral-storage" "2Gi")
|
|
)
|
|
"medium" (dict
|
|
"requests" (dict "cpu" "500m" "memory" "1Gi" "ephemeral-storage" "50Mi")
|
|
"limits" (dict "memory" "1Gi" "ephemeral-storage" "2Gi")
|
|
)
|
|
"large" (dict
|
|
"requests" (dict "cpu" "1" "memory" "2Gi" "ephemeral-storage" "50Mi")
|
|
"limits" (dict "memory" "2Gi" "ephemeral-storage" "2Gi")
|
|
)
|
|
"xlarge" (dict
|
|
"requests" (dict "cpu" "2" "memory" "4Gi" "ephemeral-storage" "50Mi")
|
|
"limits" (dict "memory" "4Gi" "ephemeral-storage" "2Gi")
|
|
)
|
|
"2xlarge" (dict
|
|
"requests" (dict "cpu" "4" "memory" "8Gi" "ephemeral-storage" "50Mi")
|
|
"limits" (dict "memory" "8Gi" "ephemeral-storage" "2Gi")
|
|
)
|
|
}}
|
|
{{- if hasKey $presets .type -}}
|
|
{{- index $presets .type | toYaml -}}
|
|
{{- else -}}
|
|
{{- printf "ERROR: Preset key '%s' invalid. Allowed values are %s" .type (join "," (keys $presets)) | fail -}}
|
|
{{- end -}}
|
|
{{- end -}}
|