Skip to content

Commit 051e015

Browse files
committed
commit logs when debug mode one handling
1 parent dc610e2 commit 051e015

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

e2e-tests/functions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ deploy_operator() {
5555
fi
5656
yq eval '.spec.template.spec.containers[0].image = "'${IMAGE}'"' "${DEPLOY_DIR}/${cw_prefix}operator.yaml" \
5757
| yq eval '(.spec.template.spec.containers[] | select(.name=="operator") | .env[] | select(.name=="DISABLE_TELEMETRY") | .value) = "'${disable_telemetry}'"' - \
58+
| yq eval '(.spec.template.spec.containers[] | select(.name=="operator") | .env[] | select(.name=="LOG_LEVEL") | .value) = "DEBUG"' - \
5859
| kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f -
5960
}
6061

percona/controller/pgbackup/controller.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ func (r *PGBackupReconciler) Reconcile(ctx context.Context, request reconcile.Re
297297
if err != nil {
298298
return reconcile.Result{}, errors.Wrap(err, "failed to create exec client")
299299
}
300-
301300
latestRestorableTime, err := watcher.GetLatestCommitTimestamp(ctx, r.Client, execCli, pgCluster, pgBackup)
302301
if err == nil {
303302
log.Info("Got latest restorable timestamp", "timestamp", latestRestorableTime)

percona/watcher/wal.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ func GetWALWatcher(cr *pgv2.PerconaPGCluster) (string, WALWatcher) {
3838
func WatchCommitTimestamps(ctx context.Context, cli client.Client, eventChan chan event.GenericEvent, stopChan chan event.DeleteEvent, cr *pgv2.PerconaPGCluster) {
3939
log := logging.FromContext(ctx).WithName("WALWatcher")
4040

41+
if !cr.Spec.Backups.IsEnabled() {
42+
return
43+
}
44+
4145
log.Info("Watching commit timestamps")
4246

4347
execCli, err := clientcmd.NewClient()
@@ -69,7 +73,6 @@ func WatchCommitTimestamps(ctx context.Context, cli client.Client, eventChan cha
6973

7074
continue
7175
}
72-
7376
ts, err := GetLatestCommitTimestamp(ctx, cli, execCli, localCr, latestBackup)
7477
if err != nil {
7578
switch {

0 commit comments

Comments
 (0)