From 2790c1057eb7373270f708e5b2bc88fd45473cb4 Mon Sep 17 00:00:00 2001 From: Seer Date: Thu, 10 Oct 2024 14:47:53 +0800 Subject: [PATCH] fix: fix bugs of init schema (#74) Co-authored-by: Seer --- charts/redis-operator/templates/deployment.yaml | 6 +++++- charts/redis-operator/values.yaml | 9 +++++++++ cmd/main.go | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/charts/redis-operator/templates/deployment.yaml b/charts/redis-operator/templates/deployment.yaml index 2b2540a..0b2bbb3 100644 --- a/charts/redis-operator/templates/deployment.yaml +++ b/charts/redis-operator/templates/deployment.yaml @@ -53,6 +53,10 @@ spec: fieldPath: status.podIP - name: DEFAULT_REDIS_IMAGE value: "{{ .Values.images.defaultRedis.repository }}:{{ .Values.images.defaultRedis.tag }}" + - name: REDIS_VERSION_5_IMAGE + value: "{{ .Values.images.redis5.repository }}:{{ .Values.images.redis5.tag }}" + - name: REDIS_VERSION_5_VERSION + value: "{{ .Values.images.redis5.tag }}" - name: REDIS_VERSION_6_IMAGE value: "{{ .Values.images.redis6.repository }}:{{ .Values.images.redis6.tag }}" - name: REDIS_VERSION_6_VERSION @@ -66,7 +70,7 @@ spec: - name: REDIS_TOOLS_IMAGE value: "{{ .Values.images.redisOperator.repository }}:{{ .Values.images.redisOperator.tag }}" - name: REDIS_OPERATOR_VERSION - value: "{{ .Values.redisOperator.tag }}" + value: "{{ .Values.redisOperator.version }}" securityContext: {{- toYaml .Values.redisOperator.securityContext | nindent 12 }} image: "{{ .Values.images.redisOperator.repository }}:{{ .Values.images.redisOperator.tag }}" diff --git a/charts/redis-operator/values.yaml b/charts/redis-operator/values.yaml index 71dcc2b..04b2d96 100644 --- a/charts/redis-operator/values.yaml +++ b/charts/redis-operator/values.yaml @@ -14,7 +14,16 @@ images: redisOperator: repository: alaudaos/redis-operator tag: latest + version: "3.18.0" digest: "c6fffd56a8ac0411c9461891062070d1321a65f1cfa5172b1a50a9bc34a9d6a5" + defaultRedis: + repository: redis + tag: 6.0 + digest: "b99ffd0554dc8d300230b9d1b9f2a129a6abf595bf8589883beb980ed1feae3d" + redis5: + repository: redis + tag: 5.0 + digest: "fc5ecd863862f89f04334b7cbb57e93c9790478ea8188a49f6e57b0967d38c75" redis6: repository: redis tag: 6.0 diff --git a/cmd/main.go b/cmd/main.go index 85b39f7..b0b00c3 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -38,6 +38,7 @@ import ( _ "github.com/alauda/redis-operator/internal/ops/failover/actor" _ "github.com/alauda/redis-operator/internal/ops/sentinel/actor" "github.com/alauda/redis-operator/internal/vc" + vcv1 "github.com/alauda/redis-operator/internal/vc/v1" "github.com/alauda/redis-operator/pkg/actor" "github.com/alauda/redis-operator/pkg/kubernetes/clientset" @@ -72,6 +73,7 @@ func init() { utilruntime.Must(databasesv1.AddToScheme(scheme)) utilruntime.Must(middlewarev1.AddToScheme(scheme)) utilruntime.Must(middlewareredisv1.AddToScheme(scheme)) + utilruntime.Must(vcv1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme }