mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 14:01:46 +02:00
upgrade Go from 1.23.4 to 1.25.0 (#2945)
* upgrade go to 1.25 * add minor version to be Go 1.25.0 * revert the Go version on README to keep the history of the release
This commit is contained in:
@@ -171,7 +171,7 @@ func (c *Cluster) enforceMinResourceLimits(resources *v1.ResourceRequirements) e
|
||||
if isSmaller {
|
||||
msg = fmt.Sprintf("defined CPU limit %s for %q container is below required minimum %s and will be increased",
|
||||
cpuLimit.String(), constants.PostgresContainerName, minCPULimit)
|
||||
c.logger.Warningf(msg)
|
||||
c.logger.Warningf("%s", msg)
|
||||
c.eventRecorder.Eventf(c.GetReference(), v1.EventTypeWarning, "ResourceLimits", msg)
|
||||
resources.Limits[v1.ResourceCPU], _ = resource.ParseQuantity(minCPULimit)
|
||||
}
|
||||
@@ -188,7 +188,7 @@ func (c *Cluster) enforceMinResourceLimits(resources *v1.ResourceRequirements) e
|
||||
if isSmaller {
|
||||
msg = fmt.Sprintf("defined memory limit %s for %q container is below required minimum %s and will be increased",
|
||||
memoryLimit.String(), constants.PostgresContainerName, minMemoryLimit)
|
||||
c.logger.Warningf(msg)
|
||||
c.logger.Warningf("%s", msg)
|
||||
c.eventRecorder.Eventf(c.GetReference(), v1.EventTypeWarning, "ResourceLimits", msg)
|
||||
resources.Limits[v1.ResourceMemory], _ = resource.ParseQuantity(minMemoryLimit)
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ func (c *Cluster) majorVersionUpgrade() error {
|
||||
isUpgradeSuccess = false
|
||||
c.annotatePostgresResource(isUpgradeSuccess)
|
||||
c.eventRecorder.Eventf(c.GetReference(), v1.EventTypeWarning, "Major Version Upgrade", "upgrade from %d to %d FAILED: %v", c.currentMajorVersion, desiredVersion, scriptErrMsg)
|
||||
return fmt.Errorf(scriptErrMsg)
|
||||
return fmt.Errorf("%s", scriptErrMsg)
|
||||
}
|
||||
|
||||
c.annotatePostgresResource(isUpgradeSuccess)
|
||||
|
||||
+1
-1
@@ -1208,7 +1208,7 @@ func (c *Cluster) updateSecret(
|
||||
}
|
||||
|
||||
if updateSecret {
|
||||
c.logger.Infof(updateSecretMsg)
|
||||
c.logger.Infof("%s", updateSecretMsg)
|
||||
if secret, err = c.KubeClient.Secrets(secret.Namespace).Update(context.TODO(), secret, metav1.UpdateOptions{}); err != nil {
|
||||
return fmt.Errorf("could not update secret %s: %v", secretName, err)
|
||||
}
|
||||
|
||||
+2
-2
@@ -257,9 +257,9 @@ func (c *Cluster) getTeamMembers(teamID string) ([]string, error) {
|
||||
if teamID == "" {
|
||||
msg := "no teamId specified"
|
||||
if c.OpConfig.EnableTeamIdClusternamePrefix {
|
||||
return nil, fmt.Errorf(msg)
|
||||
return nil, fmt.Errorf("%s", msg)
|
||||
}
|
||||
c.logger.Warnf(msg)
|
||||
c.logger.Warnf("%s", msg)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ func (c *Cluster) syncUnderlyingEBSVolume() error {
|
||||
|
||||
if len(errors) > 0 {
|
||||
for _, s := range errors {
|
||||
c.logger.Warningf(s)
|
||||
c.logger.Warningf("%s", s)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -597,7 +597,7 @@ func (c *Controller) createPodServiceAccount(namespace string) error {
|
||||
_, err := c.KubeClient.ServiceAccounts(namespace).Get(context.TODO(), podServiceAccountName, metav1.GetOptions{})
|
||||
if k8sutil.ResourceNotFound(err) {
|
||||
|
||||
c.logger.Infof(fmt.Sprintf("creating pod service account %q in the %q namespace", podServiceAccountName, namespace))
|
||||
c.logger.Infof("creating pod service account %q in the %q namespace", podServiceAccountName, namespace)
|
||||
|
||||
// get a separate copy of service account
|
||||
// to prevent a race condition when setting a namespace for many clusters
|
||||
|
||||
@@ -248,7 +248,7 @@ func (c *Controller) getInfrastructureRoles(
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return uniqRoles, fmt.Errorf(strings.Join(errors, `', '`))
|
||||
return uniqRoles, fmt.Errorf("%s", strings.Join(errors, `', '`))
|
||||
}
|
||||
|
||||
return uniqRoles, nil
|
||||
|
||||
Reference in New Issue
Block a user