Browse Source

mount failover.sh to redis instances

master
Vladimir Smagin 1 year ago
parent
commit
a857192b29
1 changed files with 14 additions and 5 deletions
  1. +14
    -5
      pkg/controller/redis/manifest_statefulset.go

+ 14
- 5
pkg/controller/redis/manifest_statefulset.go View File

@ -65,11 +65,6 @@ func generateStatefulSet(cr *blindagev1alpha1.Redis) v1.StatefulSet {
},
},
},
// EnvFrom: []corev1.EnvFromSource{
// {
// ConfigMapRef: &corev1.ConfigMapEnvSource{LocalObjectReference: corev1.LocalObjectReference{Name: cr.Name}},
// },
// },
Env: []corev1.EnvVar{
{
Name: "SENTINEL_SERVICE",
@ -93,6 +88,10 @@ func generateStatefulSet(cr *blindagev1alpha1.Redis) v1.StatefulSet {
MountPath: "/redis/data",
},
{
Name: "failover",
MountPath: "/failover.sh",
SubPath: "failover.sh",
}, {
Name: "config",
MountPath: "/redis/redis.conf",
SubPath: "redis.conf",
@ -118,6 +117,16 @@ func generateStatefulSet(cr *blindagev1alpha1.Redis) v1.StatefulSet {
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
},
{
Name: "failover",
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: cr.Name + "-failover",
},
},
},
},
{
Name: "config",
VolumeSource: corev1.VolumeSource{


Loading…
Cancel
Save