Skip to content

Commit

Permalink
Merge pull request #280 from 3scale-ops/fix/sentinel-switchMasterCoun…
Browse files Browse the repository at this point in the history
…t-metric

Fix/Sentinel switch-master-count metric
  • Loading branch information
3scale-robot authored Nov 16, 2023
2 parents e7be77f + 2c2b0c1 commit 64dac09
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.20.1
VERSION ?= 0.20.2

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down
8 changes: 4 additions & 4 deletions bundle/manifests/saas-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -657,15 +657,15 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/3scale/saas-operator
createdAt: "2023-10-25T15:22:33Z"
createdAt: "2023-11-16T11:11:43Z"
description: |-
The 3scale SaaS Operator creates and maintains a SaaS-ready deployment
of the Red Hat 3scale API Management on OpenShift.
operators.operatorframework.io/builder: operator-sdk-v1.27.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/3scale/saas-operator
support: Red Hat
name: saas-operator.v0.20.1
name: saas-operator.v0.20.2
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -4540,7 +4540,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
image: quay.io/3scale/saas-operator:v0.20.1
image: quay.io/3scale/saas-operator:v0.20.2
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -5104,4 +5104,4 @@ spec:
provider:
name: Red Hat
url: https://www.3scale.net/
version: 0.20.1
version: 0.20.2
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/3scale/saas-operator
newTag: v0.20.1
newTag: v0.20.2
4 changes: 1 addition & 3 deletions pkg/redis/events/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
Namespace: "saas_redis_sentinel",
Help: "+switch-master (https://redis.io/topics/sentinel#sentinel-api)",
},
[]string{"sentinel", "shard", "redis_server"},
[]string{"sentinel", "shard"},
)

failoverAbortNoGoodSlaveCount = prometheus.NewCounterVec(
Expand Down Expand Up @@ -194,7 +194,6 @@ func (sew *SentinelEventWatcher) metricsFromEvent(rem RedisEventMessage) {
switchMasterCount.With(
prometheus.Labels{
"sentinel": sew.sentinelURI, "shard": rem.master.name,
"redis_server": fmt.Sprintf("%s:%s", rem.master.ip, rem.master.port),
},
).Add(1)
case "-failover-abort-no-good-slave":
Expand Down Expand Up @@ -254,7 +253,6 @@ func (sew *SentinelEventWatcher) initCounters() {
switchMasterCount.With(
prometheus.Labels{
"sentinel": sew.sentinelURI, "shard": shard.Name,
"redis_server": server.ID(),
},
).Add(0)
sdownSentinelCount.With(
Expand Down
2 changes: 1 addition & 1 deletion pkg/version/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package version

const (
version string = "v0.20.1"
version string = "v0.20.2"
)

// Current returns the current marin3r operator version
Expand Down

0 comments on commit 64dac09

Please sign in to comment.