You've already forked helm-gitea
chore(deps)!: Migrate to Valkey from Redis (#775)
<!-- Before you open the request please review the following guidelines and tips to help it be more easily integrated: - Describe the scope of your change - i.e. what the change does. - Describe any known limitations with your change. - Please run any tests or examples that can exercise your modified code. Thank you for contributing! We will try to review, test and integrate the change as soon as we can. --> ### Description of the change Migrates from Redis to Valkey. ### Benefits The Redis License is changing from BSD-3-Clause to RSALv2 and SSPLv1 which are not open source under the OSI definition. We should consider open-source alternatives as a default replacement for Redis. ### Possible drawbacks Large scale change, potentially breaking. ### Applicable issues https://github.com/go-gitea/gitea/issues/32056 ### ⚠ BREAKING Major version change, redis provider changed to valkey. ### Checklist <!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] --> - [X] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) - [X] Breaking changes are documented in the `README.md` - [X] Helm templating unittests are added (required when changing anything in `templates` folder) Co-authored-by: pat-s <patrick.schratz@gmail.com> Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/775 Reviewed-by: pat-s <pat-s@noreply.gitea.com> Co-authored-by: Sean Teo <sawntoe@gmail.com> Co-committed-by: Sean Teo <sawntoe@gmail.com>
This commit is contained in:
@ -1,19 +1,19 @@
|
||||
suite: Dependency checks | Customization integrity | redis-cluster
|
||||
suite: Dependency checks | Customization integrity | valkey-cluster
|
||||
release:
|
||||
name: gitea-unittests
|
||||
namespace: testing
|
||||
set:
|
||||
redis:
|
||||
valkey:
|
||||
enabled: false
|
||||
redis-cluster:
|
||||
valkey-cluster:
|
||||
enabled: true
|
||||
usePassword: false
|
||||
cluster:
|
||||
nodes: 5
|
||||
replicas: 2
|
||||
tests:
|
||||
- it: "[redis-cluster] configures correct nodes/replicas"
|
||||
template: charts/redis-cluster/templates/redis-statefulset.yaml
|
||||
- it: "[valkey-cluster] configures correct nodes/replicas"
|
||||
template: charts/valkey-cluster/templates/valkey-statefulset.yaml
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
@ -22,31 +22,31 @@ tests:
|
||||
- documentIndex: 0
|
||||
matchRegex:
|
||||
path: spec.template.spec.containers[0].args[0]
|
||||
pattern: REDIS_CLUSTER_REPLICAS="2"
|
||||
- it: "[redis-cluster] support auth-less connections"
|
||||
pattern: VALKEY_CLUSTER_REPLICAS="2"
|
||||
- it: "[valkey-cluster] support auth-less connections"
|
||||
asserts:
|
||||
- template: charts/redis-cluster/templates/secret.yaml
|
||||
- template: charts/valkey-cluster/templates/secret.yaml
|
||||
hasDocuments:
|
||||
count: 0
|
||||
- template: charts/redis-cluster/templates/redis-statefulset.yaml
|
||||
- template: charts/valkey-cluster/templates/valkey-statefulset.yaml
|
||||
documentIndex: 0
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: ALLOW_EMPTY_PASSWORD
|
||||
value: "yes"
|
||||
- it: "[redis-cluster] support auth-full connections"
|
||||
- it: "[valkey-cluster] support auth-full connections"
|
||||
set:
|
||||
redis-cluster:
|
||||
valkey-cluster:
|
||||
usePassword: true
|
||||
asserts:
|
||||
- template: charts/redis-cluster/templates/secret.yaml
|
||||
- template: charts/valkey-cluster/templates/secret.yaml
|
||||
containsDocument:
|
||||
kind: Secret
|
||||
apiVersion: v1
|
||||
name: gitea-unittests-redis-cluster
|
||||
name: gitea-unittests-valkey-cluster
|
||||
namespace: testing
|
||||
- template: charts/redis-cluster/templates/redis-statefulset.yaml
|
||||
- template: charts/valkey-cluster/templates/valkey-statefulset.yaml
|
||||
documentIndex: 0
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
@ -54,25 +54,25 @@ tests:
|
||||
name: REDISCLI_AUTH
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-unittests-redis-cluster
|
||||
key: redis-password
|
||||
- template: charts/redis-cluster/templates/redis-statefulset.yaml
|
||||
name: gitea-unittests-valkey-cluster
|
||||
key: valkey-password
|
||||
- template: charts/valkey-cluster/templates/valkey-statefulset.yaml
|
||||
documentIndex: 0
|
||||
contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: REDIS_PASSWORD
|
||||
name: REDISCLI_AUTH
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-unittests-redis-cluster
|
||||
key: redis-password
|
||||
- it: "[redis-cluster] renders the referenced service"
|
||||
template: charts/redis-cluster/templates/headless-svc.yaml
|
||||
name: gitea-unittests-valkey-cluster
|
||||
key: valkey-password
|
||||
- it: "[valkey-cluster] renders the referenced service"
|
||||
template: charts/valkey-cluster/templates/headless-svc.yaml
|
||||
asserts:
|
||||
- containsDocument:
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
name: gitea-unittests-redis-cluster-headless
|
||||
name: gitea-unittests-valkey-cluster-headless
|
||||
namespace: testing
|
||||
- documentIndex: 0
|
||||
contains:
|
||||
@ -81,10 +81,10 @@ tests:
|
||||
name: tcp-redis
|
||||
port: 6379
|
||||
targetPort: tcp-redis
|
||||
- it: "[gitea] waits for redis-cluster to be up and running"
|
||||
- it: "[gitea] waits for valkey-cluster to be up and running"
|
||||
template: templates/gitea/init.yaml
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
matchRegex:
|
||||
path: stringData["configure_gitea.sh"]
|
||||
pattern: nc -vz -w2 gitea-unittests-redis-cluster-headless.testing.svc.cluster.local 6379
|
||||
pattern: nc -vz -w2 gitea-unittests-valkey-cluster-headless.testing.svc.cluster.local 6379
|
@ -1,40 +1,40 @@
|
||||
suite: Dependency checks | Customization integrity | redis
|
||||
suite: Dependency checks | Customization integrity | valkey
|
||||
release:
|
||||
name: gitea-unittests
|
||||
namespace: testing
|
||||
set:
|
||||
redis-cluster:
|
||||
valkey-cluster:
|
||||
enabled: false
|
||||
redis:
|
||||
valkey:
|
||||
enabled: true
|
||||
architecture: standalone
|
||||
global:
|
||||
redis:
|
||||
valkey:
|
||||
password: gitea-password
|
||||
master:
|
||||
count: 2
|
||||
tests:
|
||||
- it: "[redis] configures correct 'master' nodes"
|
||||
template: charts/redis/templates/master/application.yaml
|
||||
- it: "[valkey] configures correct 'master' nodes"
|
||||
template: charts/valkey/templates/primary/application.yaml
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.replicas
|
||||
value: 2
|
||||
- it: "[redis] redis.global.redis.password is applied as expected"
|
||||
template: charts/redis/templates/secret.yaml
|
||||
value: 1
|
||||
- it: "[valkey] valkey.global.valkey.password is applied as expected"
|
||||
template: charts/valkey/templates/secret.yaml
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: data["redis-password"]
|
||||
path: data["valkey-password"]
|
||||
value: "Z2l0ZWEtcGFzc3dvcmQ="
|
||||
- it: "[redis] renders the referenced service"
|
||||
template: charts/redis/templates/headless-svc.yaml
|
||||
- it: "[valkey] renders the referenced service"
|
||||
template: charts/valkey/templates/headless-svc.yaml
|
||||
asserts:
|
||||
- containsDocument:
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
name: gitea-unittests-redis-headless
|
||||
name: gitea-unittests-valkey-headless
|
||||
namespace: testing
|
||||
- documentIndex: 0
|
||||
contains:
|
||||
@ -43,10 +43,10 @@ tests:
|
||||
name: tcp-redis
|
||||
port: 6379
|
||||
targetPort: redis
|
||||
- it: "[gitea] waits for redis to be up and running"
|
||||
- it: "[gitea] waits for valkey to be up and running"
|
||||
template: templates/gitea/init.yaml
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
matchRegex:
|
||||
path: stringData["configure_gitea.sh"]
|
||||
pattern: nc -vz -w2 gitea-unittests-redis-headless.testing.svc.cluster.local 6379
|
||||
pattern: nc -vz -w2 gitea-unittests-valkey-headless.testing.svc.cluster.local 6379
|
@ -29,29 +29,29 @@ tests:
|
||||
path: spec.template.spec.containers[0].image
|
||||
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
||||
pattern: bitnami/postgresql:17.+$
|
||||
- it: "[redis-cluster] ensures we detect major image version upgrades"
|
||||
template: charts/redis-cluster/templates/redis-statefulset.yaml
|
||||
- it: "[valkey-cluster] ensures we detect major image version upgrades"
|
||||
template: charts/valkey-cluster/templates/valkey-statefulset.yaml
|
||||
set:
|
||||
redis-cluster:
|
||||
valkey-cluster:
|
||||
enabled: true
|
||||
redis:
|
||||
valkey:
|
||||
enabled: false
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
matchRegex:
|
||||
path: spec.template.spec.containers[0].image
|
||||
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
||||
pattern: bitnami/redis-cluster:7.+$
|
||||
- it: "[redis] ensures we detect major image version upgrades"
|
||||
template: charts/redis/templates/master/application.yaml
|
||||
pattern: bitnami/valkey-cluster:8.+$
|
||||
- it: "[valkey] ensures we detect major image version upgrades"
|
||||
template: charts/valkey/templates/primary/application.yaml
|
||||
set:
|
||||
redis-cluster:
|
||||
valkey-cluster:
|
||||
enabled: false
|
||||
redis:
|
||||
valkey:
|
||||
enabled: true
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
matchRegex:
|
||||
path: spec.template.spec.containers[0].image
|
||||
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
||||
pattern: bitnami/redis:7.+$
|
||||
pattern: bitnami/valkey:8.+$
|
||||
|
Reference in New Issue
Block a user