Skip to content

Commit 46f43f3

Browse files
gkechmgumz
authored andcommitted
K8SPS-353 add required pitr binlog fields (percona#823)
1 parent c3033b4 commit 46f43f3

File tree

7 files changed

+27
-8
lines changed

7 files changed

+27
-8
lines changed

api/v1alpha1/perconaservermysql_types.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,16 +369,15 @@ type BinlogServerSpec struct {
369369
Storage BinlogServerStorageSpec `json:"storage"`
370370

371371
// The number of seconds the MySQL client library will wait to establish a connection with a remote host
372-
ConnectTimeout int32 `json:"connectTimeout,omitempty"`
372+
ConnectTimeout int32 `json:"connectTimeout"`
373373
// The number of seconds the MySQL client library will wait to read data from a remote server.
374-
ReadTimeout int32 `json:"readTimeout,omitempty"`
374+
ReadTimeout int32 `json:"readTimeout"`
375375
// The number of seconds the MySQL client library will wait to write data to a remote server.
376-
WriteTimeout int32 `json:"writeTimeout,omitempty"`
377-
376+
WriteTimeout int32 `json:"writeTimeout"`
378377
// Specifies the server ID that the utility will be using when connecting to a remote MySQL server
379-
ServerID int32 `json:"serverId,omitempty"`
378+
ServerID int32 `json:"serverId"`
380379
// The number of seconds the utility will spend in disconnected mode between reconnection attempts.
381-
IdleTime int32 `json:"idleTime,omitempty"`
380+
IdleTime int32 `json:"idleTime"`
382381

383382
PodSpec `json:",inline"`
384383
}

config/crd/bases/ps.percona.com_perconaservermysqls.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,8 +1374,13 @@ spec:
13741374
format: int32
13751375
type: integer
13761376
required:
1377+
- connectTimeout
1378+
- idleTime
13771379
- image
1380+
- readTimeout
1381+
- serverId
13781382
- storage
1383+
- writeTimeout
13791384
type: object
13801385
enabled:
13811386
type: boolean

deploy/bundle.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3282,8 +3282,13 @@ spec:
32823282
format: int32
32833283
type: integer
32843284
required:
3285+
- connectTimeout
3286+
- idleTime
32853287
- image
3288+
- readTimeout
3289+
- serverId
32863290
- storage
3291+
- writeTimeout
32873292
type: object
32883293
enabled:
32893294
type: boolean

deploy/crd.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3282,8 +3282,13 @@ spec:
32823282
format: int32
32833283
type: integer
32843284
required:
3285+
- connectTimeout
3286+
- idleTime
32853287
- image
3288+
- readTimeout
3289+
- serverId
32863290
- storage
3291+
- writeTimeout
32873292
type: object
32883293
enabled:
32893294
type: boolean

deploy/cw-bundle.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3282,8 +3282,13 @@ spec:
32823282
format: int32
32833283
type: integer
32843284
required:
3285+
- connectTimeout
3286+
- idleTime
32853287
- image
3288+
- readTimeout
3289+
- serverId
32863290
- storage
3291+
- writeTimeout
32873292
type: object
32883293
enabled:
32893294
type: boolean

pkg/controller/ps/controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ func (r *PerconaServerMySQLReconciler) reconcileBinlogServer(ctx context.Context
11601160
s3 := cr.Spec.Backup.PiTR.BinlogServer.Storage.S3
11611161

11621162
if s3 != nil && len(s3.CredentialsSecret) == 0 {
1163-
logger.Info("You need to set spec.backup.pitr.binlogServer.s3.credentialsSecret to upload binlogs to s3")
1163+
logger.Info("setting spec.backup.pitr.binlogServer.s3.credentialsSecret is required to upload binlogs to s3")
11641164
return nil
11651165
}
11661166

pkg/controller/ps/controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ var _ = Describe("Reconcile Binlog Server", Ordered, func() {
470470
PodSpec: psv1alpha1.PodSpec{
471471
Size: 1,
472472
ContainerSpec: psv1alpha1.ContainerSpec{
473-
Image: "perconalab/percona-server-mysql-operator:binlog-server",
473+
Image: "binlog-server-image",
474474
},
475475
},
476476
}

0 commit comments

Comments
 (0)