Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exporter ports enabled even when exporters disabled #484

Merged
merged 2 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions k8sutils/redis-cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ func (service RedisClusterService) CreateRedisClusterService(cr *redisv1beta1.Re
annotations := generateServiceAnots(cr.ObjectMeta, nil)
if cr.Spec.RedisExporter != nil && cr.Spec.RedisExporter.Enabled {
enableMetrics = true
} else {
enableMetrics = false
}
additionalServiceAnnotations := map[string]string{}
if cr.Spec.KubernetesConfig.Service != nil {
Expand Down
2 changes: 2 additions & 0 deletions k8sutils/redis-replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ func CreateReplicationService(cr *redisv1beta1.RedisReplication) error {
annotations := generateServiceAnots(cr.ObjectMeta, nil)
if cr.Spec.RedisExporter != nil && cr.Spec.RedisExporter.Enabled {
enableMetrics = true
} else {
enableMetrics = false
}
additionalServiceAnnotations := map[string]string{}
if cr.Spec.KubernetesConfig.Service != nil {
Expand Down
2 changes: 2 additions & 0 deletions k8sutils/redis-sentinel.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ func (service RedisSentinelService) CreateRedisSentinelService(cr *redisv1beta1.

if cr.Spec.RedisExporter != nil && cr.Spec.RedisExporter.Enabled {
enableMetrics = true
} else {
enableMetrics = false
}
additionalServiceAnnotations := map[string]string{}
if cr.Spec.KubernetesConfig.Service != nil {
Expand Down
2 changes: 2 additions & 0 deletions k8sutils/redis-standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ func CreateStandaloneService(cr *redisv1beta1.Redis) error {
annotations := generateServiceAnots(cr.ObjectMeta, nil)
if cr.Spec.RedisExporter != nil && cr.Spec.RedisExporter.Enabled {
enableMetrics = true
} else {
enableMetrics = false
}
additionalServiceAnnotations := map[string]string{}
if cr.Spec.KubernetesConfig.Service != nil {
Expand Down