Skip to content

Commit

Permalink
style: Changed the variable name/function name expression
Browse files Browse the repository at this point in the history
Signed-off-by: wkd-woo <[email protected]>
  • Loading branch information
wkd-woo committed Mar 18, 2024
1 parent a4ef670 commit a1360bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions k8sutils/redis-replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func CreateReplicationService(cr *redisv1beta2.RedisReplication, cl kubernetes.I
}
objectMetaInfo := generateObjectMetaInformation(cr.ObjectMeta.Name, cr.Namespace, labels, annotations)
headlessObjectMetaInfo := generateObjectMetaInformation(cr.ObjectMeta.Name+"-headless", cr.Namespace, labels, annotations)
masterObjectMetaInfo := generateObjectMetaInformation(cr.ObjectMeta.Name+"-master", cr.Namespace, labels, annotations)
slaveObjectMetaInfo := generateObjectMetaInformation(cr.ObjectMeta.Name+"-readReplica", cr.Namespace, labels, annotations)
masterObjectMetaInfo := generateObjectMetaInformation(cr.ObjectMeta.Name+"-leader", cr.Namespace, labels, annotations)
slaveObjectMetaInfo := generateObjectMetaInformation(cr.ObjectMeta.Name+"-follower", cr.Namespace, labels, annotations)
additionalObjectMetaInfo := generateObjectMetaInformation(cr.ObjectMeta.Name+"-additional", cr.Namespace, labels, generateServiceAnots(cr.ObjectMeta, additionalServiceAnnotations, epp))
err := CreateOrUpdateService(cr.Namespace, headlessObjectMetaInfo, redisReplicationAsOwner(cr), disableMetrics, true, "ClusterIP", redisPort, cl)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions k8sutils/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ func generateServiceDef(serviceMeta metav1.ObjectMeta, epp exporterPortProvider,
PortName = "redis-client"
}
selectorLabels := serviceMeta.GetLabels()
if serviceMeta.GetName() == "redis-replication-master" {
if serviceMeta.GetName() == "redis-replication-leader" {
selectorLabels["redis-role"] = "master"
}
if serviceMeta.GetName() == "redis-replication-readReplica" {
if serviceMeta.GetName() == "redis-replication-follower" {
selectorLabels["redis-role"] = "slave"
}
service := &corev1.Service{
Expand Down

0 comments on commit a1360bb

Please sign in to comment.