Skip to content

Commit 899c0be

Browse files
authored
Use warningf instead of warnf
1 parent a987ff3 commit 899c0be

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

pkg/apiserver/apiserver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (s *Server) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) {
101101
defer cancel()
102102
err := s.http.Shutdown(ctx)
103103
if err == context.DeadlineExceeded {
104-
s.logger.Warnf("Shutdown timeout exceeded. closing http server")
104+
s.logger.Warningf("Shutdown timeout exceeded. closing http server")
105105
s.http.Close()
106106
} else if err != nil {
107107
s.logger.Errorf("Could not shutdown http server: %v", err)

pkg/cluster/cluster.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) *comp
294294
}
295295
if len(c.Statefulset.Spec.Template.Spec.Containers) == 0 {
296296

297-
c.logger.Warnf("statefulset %q has no container", util.NameFromMeta(c.Statefulset.ObjectMeta))
297+
c.logger.Warningf("statefulset %q has no container", util.NameFromMeta(c.Statefulset.ObjectMeta))
298298
return &compareStatefulsetResult{}
299299
}
300300
// In the comparisons below, the needsReplace and needsRollUpdate flags are never reset, since checks fall through
@@ -479,7 +479,7 @@ func (c *Cluster) Update(newSpec *spec.Postgresql) error {
479479
}
480480

481481
if c.Spec.PgVersion != newSpec.Spec.PgVersion { // PG versions comparison
482-
c.logger.Warnf("postgresql version change(%q -> %q) is not allowed",
482+
c.logger.Warningf("postgresql version change(%q -> %q) is not allowed",
483483
c.Spec.PgVersion, newSpec.Spec.PgVersion)
484484
//TODO: rewrite pg version in tpr spec
485485
}

pkg/cluster/k8sres.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ PATRONI_INITDB_PARAMS:
145145
}
146146
}
147147
default:
148-
c.logger.Warnf("unsupported type for initdb configuration item %s: %T", defaultParam, defaultParam)
148+
c.logger.Warningf("unsupported type for initdb configuration item %s: %T", defaultParam, defaultParam)
149149
continue PATRONI_INITDB_PARAMS
150150
}
151151
}

pkg/cluster/resources.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func (c *Cluster) replaceStatefulSet(newStatefulSet *v1beta1.StatefulSet) error
199199
// check that all the previous replicas were picked up.
200200
if newStatefulSet.Spec.Replicas == oldStatefulset.Spec.Replicas &&
201201
createdStatefulset.Status.Replicas != oldStatefulset.Status.Replicas {
202-
c.logger.Warnf("number of pods for the old and updated Statefulsets is not identical")
202+
c.logger.Warningf("number of pods for the old and updated Statefulsets is not identical")
203203
}
204204

205205
c.Statefulset = createdStatefulset

pkg/controller/util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Users:
9999
case "inrole":
100100
t.MemberOf = append(t.MemberOf, s)
101101
default:
102-
c.logger.Warnf("unknown key %q", p)
102+
c.logger.Warningf("unknown key %q", p)
103103
}
104104
}
105105
}

0 commit comments

Comments
 (0)