Skip to content

Commit

Permalink
fix: set redis configuration on default path (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
Victoremepunto authored Oct 21, 2024
1 parent 76260c9 commit 3bf8d66
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions controllers/cloud.redhat.com/providers/inmemorydb/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (r *localRedis) Provide(app *crd.ClowdApp) error {
labeler := utils.MakeLabeler(nn, nil, app)
labeler(configMap)

configMap.Data = map[string]string{"redis.conf": "stop-writes-on-bgsave-error no\n"}
configMap.Data = map[string]string{"redis.conf": "stop-writes-on-bgsave-error no\nprotected-mode no"}

err = r.Provider.Cache.Update(RedisConfigMap, configMap)

Expand Down Expand Up @@ -148,11 +148,7 @@ func makeLocalRedis(o obj.ClowdObject, objMap providers.ObjectMap, _ bool, nodeP
dd.Spec.Template.Spec.Containers = []core.Container{{
Name: nn.Name,
Image: providerUtils.DefaultImageInMemoryDB,
Command: []string{
"redis-server",
"/usr/local/etc/redis/redis.conf",
},
Env: []core.EnvVar{},
Env: []core.EnvVar{},
Ports: []core.ContainerPort{{
Name: "redis",
ContainerPort: 6379,
Expand All @@ -162,7 +158,7 @@ func makeLocalRedis(o obj.ClowdObject, objMap providers.ObjectMap, _ bool, nodeP
ReadinessProbe: &readinessProbe,
VolumeMounts: []core.VolumeMount{{
Name: nn.Name,
MountPath: "/usr/local/etc/redis/",
MountPath: "/var/lib/redis/data",
}},
TerminationMessagePath: "/dev/termination-log",
TerminationMessagePolicy: core.TerminationMessageReadFile,
Expand Down

0 comments on commit 3bf8d66

Please sign in to comment.