Skip to content

Commit e9fbd7c

Browse files
authored
Merge branch 'main' into K8SPG-726_add_sc
2 parents 8d488c9 + 53693c4 commit e9fbd7c

35 files changed

Lines changed: 672 additions & 136 deletions

.github/workflows/reviewdog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
go-version: '^1.23'
1111
- uses: actions/checkout@v4
1212
- name: golangci-lint
13-
uses: golangci/golangci-lint-action@v6
13+
uses: golangci/golangci-lint-action@v7
1414
with:
1515
version: latest
1616
only-new-issues: true

.golangci.yaml

Lines changed: 111 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,119 @@
1-
# https://golangci-lint.run/usage/configuration/
2-
1+
version: "2"
2+
run:
3+
build-tags:
4+
- envtest
35
linters:
4-
disable:
5-
- contextcheck
6-
- gci
7-
- gofumpt
8-
- goimports
96
enable:
7+
- asasalint
8+
- asciicheck
9+
- bidichk
10+
- bodyclose
1011
- depguard
12+
- durationcheck
13+
- errchkjson
14+
- errorlint
15+
- exhaustive
16+
- gocheckcompilerdirectives
17+
- gochecksumtype
1118
- gomodguard
12-
- gosimple
19+
- gosec
20+
- gosmopolitan
1321
- importas
22+
- loggercheck
23+
- makezero
1424
- misspell
25+
- musttag
26+
- nilerr
27+
- nilnesserr
28+
- noctx
29+
- protogetter
30+
- reassign
31+
- recvcheck
32+
- rowserrcheck
33+
- spancheck
34+
- sqlclosecheck
35+
- testifylint
1536
- unconvert
16-
presets:
17-
- bugs
18-
- format
19-
- unused
20-
21-
linters-settings:
22-
gci:
23-
sections:
24-
- standard
25-
- default
26-
- prefix(github.com/percona)
27-
28-
depguard:
37+
- unparam
38+
- zerologlint
39+
disable:
40+
- contextcheck
41+
settings:
42+
depguard:
43+
rules:
44+
everything:
45+
deny:
46+
- pkg: io/ioutil
47+
desc: |
48+
Use the "io" and "os" packages instead. See https://go.dev/doc/go1.16#ioutil
49+
not-tests:
50+
files:
51+
- '!$test'
52+
deny:
53+
- pkg: net/http/httptest
54+
desc: Should be used only in tests.
55+
- pkg: testing/*
56+
desc: The "testing" packages should be used only in tests.
57+
- pkg: github.com/percona/percona-postgresql-operator/internal/testing/*
58+
desc: The "internal/testing" packages should be used only in tests.
59+
tests:
60+
files:
61+
- $test
62+
deny:
63+
- pkg: github.com/pkg/errors
64+
desc: Use the "errors" package unless you are interacting with stack traces.
65+
errchkjson:
66+
check-error-free-encoding: true
67+
exhaustive:
68+
default-signifies-exhaustive: true
69+
gomodguard:
70+
blocked:
71+
modules:
72+
- gopkg.in/yaml.v2:
73+
recommendations:
74+
- sigs.k8s.io/yaml
75+
- gopkg.in/yaml.v3:
76+
recommendations:
77+
- sigs.k8s.io/yaml
78+
- gotest.tools:
79+
recommendations:
80+
- gotest.tools/v3
81+
- k8s.io/kubernetes:
82+
reason: |
83+
k8s.io/kubernetes is for managing dependencies of the Kubernetes project, i.e. building kubelet and kubeadm.
84+
importas:
85+
alias:
86+
- pkg: k8s.io/api/(\w+)/(v[\w\w]+)
87+
alias: $1$2
88+
- pkg: k8s.io/apimachinery/pkg/apis/(\w+)/(v[\w\d]+)
89+
alias: $1$2
90+
no-unaliased: true
91+
exclusions:
92+
presets:
93+
- comments
94+
- common-false-positives
95+
- legacy
96+
- std-error-handling
2997
rules:
30-
everything:
31-
deny:
32-
- pkg: io/ioutil
33-
desc: >
34-
Use the "io" and "os" packages instead.
35-
See https://go.dev/doc/go1.16#ioutil
36-
37-
not-tests:
38-
files: ['!$test']
39-
deny:
40-
- pkg: net/http/httptest
41-
desc: Should be used only in tests.
42-
43-
- pkg: testing/*
44-
desc: The "testing" packages should be used only in tests.
45-
46-
- pkg: github.com/percona/percona-postgresql-operator/internal/testing/*
47-
desc: The "internal/testing" packages should be used only in tests.
48-
49-
tests:
50-
files: ['$test']
51-
deny:
52-
- pkg: github.com/pkg/errors
53-
desc: Use the "errors" package unless you are interacting with stack traces.
54-
55-
errchkjson:
56-
check-error-free-encoding: true
57-
58-
exhaustive:
59-
default-signifies-exhaustive: true
60-
61-
gomodguard:
62-
blocked:
63-
modules:
64-
- gopkg.in/yaml.v2: { recommendations: [sigs.k8s.io/yaml] }
65-
- gopkg.in/yaml.v3: { recommendations: [sigs.k8s.io/yaml] }
66-
- gotest.tools: { recommendations: [gotest.tools/v3] }
67-
- k8s.io/kubernetes:
68-
reason: >
69-
k8s.io/kubernetes is for managing dependencies of the Kubernetes
70-
project, i.e. building kubelet and kubeadm.
71-
72-
importas:
73-
alias:
74-
- pkg: k8s.io/api/(\w+)/(v[\w\w]+)
75-
alias: $1$2
76-
- pkg: k8s.io/apimachinery/pkg/apis/(\w+)/(v[\w\d]+)
77-
alias: $1$2
78-
no-unaliased: true
79-
80-
run:
81-
build-tags:
82-
- envtest
83-
issues:
84-
exclude-generated: strict
85-
exclude-rules:
86-
# These value types have unmarshal methods.
87-
# https://github.com/raeperd/recvcheck/issues/7
88-
- linters: [recvcheck]
89-
path: internal/pki/pki.go
90-
text: 'methods of "(Certificate|PrivateKey)"'
98+
- linters:
99+
- recvcheck
100+
path: internal/pki/pki.go
101+
text: methods of "(Certificate|PrivateKey)"
102+
paths:
103+
- third_party$
104+
- builtin$
105+
- examples$
106+
formatters:
107+
enable:
108+
- gofmt
109+
settings:
110+
gci:
111+
sections:
112+
- standard
113+
- default
114+
- prefix(github.com/percona)
115+
exclusions:
116+
paths:
117+
- third_party$
118+
- builtin$
119+
- examples$

build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5084,8 +5084,6 @@ spec:
50845084
type: object
50855085
type: object
50865086
type: object
5087-
required:
5088-
- repos
50895087
type: object
50905088
snapshots:
50915089
description: VolumeSnapshot configuration
@@ -20503,7 +20501,6 @@ spec:
2050320501
- name
2050420502
x-kubernetes-list-type: map
2050520503
required:
20506-
- backups
2050720504
- instances
2050820505
- postgresVersion
2050920506
type: object

build/crd/percona/generated/pgv2.percona.com_perconapgbackups.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ spec:
101101
type: string
102102
destination:
103103
type: string
104+
error:
105+
type: string
104106
image:
105107
type: string
106108
jobName:

build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ spec:
6464
backups:
6565
description: PostgreSQL backup configuration
6666
properties:
67+
enabled:
68+
type: boolean
6769
pgbackrest:
6870
description: pgBackRest archive configuration
6971
properties:
@@ -5246,8 +5248,6 @@ spec:
52465248
trackLatestRestorableTime:
52475249
description: Enable tracking latest restorable time
52485250
type: boolean
5249-
required:
5250-
- pgbackrest
52515251
type: object
52525252
crVersion:
52535253
description: |-

config/crd/bases/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ spec:
100100
type: string
101101
destination:
102102
type: string
103+
error:
104+
type: string
103105
image:
104106
type: string
105107
jobName:
@@ -469,6 +471,8 @@ spec:
469471
backups:
470472
description: PostgreSQL backup configuration
471473
properties:
474+
enabled:
475+
type: boolean
472476
pgbackrest:
473477
description: pgBackRest archive configuration
474478
properties:
@@ -5651,8 +5655,6 @@ spec:
56515655
trackLatestRestorableTime:
56525656
description: Enable tracking latest restorable time
56535657
type: boolean
5654-
required:
5655-
- pgbackrest
56565658
type: object
56575659
crVersion:
56585660
description: |-

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5074,8 +5074,6 @@ spec:
50745074
type: object
50755075
type: object
50765076
type: object
5077-
required:
5078-
- repos
50795077
type: object
50805078
snapshots:
50815079
description: VolumeSnapshot configuration
@@ -20401,7 +20399,6 @@ spec:
2040120399
- name
2040220400
x-kubernetes-list-type: map
2040320401
required:
20404-
- backups
2040520402
- instances
2040620403
- postgresVersion
2040720404
type: object

deploy/bundle.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ spec:
395395
type: string
396396
destination:
397397
type: string
398+
error:
399+
type: string
398400
image:
399401
type: string
400402
jobName:
@@ -766,6 +768,8 @@ spec:
766768
backups:
767769
description: PostgreSQL backup configuration
768770
properties:
771+
enabled:
772+
type: boolean
769773
pgbackrest:
770774
description: pgBackRest archive configuration
771775
properties:
@@ -5948,8 +5952,6 @@ spec:
59485952
trackLatestRestorableTime:
59495953
description: Enable tracking latest restorable time
59505954
type: boolean
5951-
required:
5952-
- pgbackrest
59535955
type: object
59545956
crVersion:
59555957
description: |-
@@ -31571,8 +31573,6 @@ spec:
3157131573
type: object
3157231574
type: object
3157331575
type: object
31574-
required:
31575-
- repos
3157631576
type: object
3157731577
snapshots:
3157831578
description: VolumeSnapshot configuration
@@ -46898,7 +46898,6 @@ spec:
4689846898
- name
4689946899
x-kubernetes-list-type: map
4690046900
required:
46901-
- backups
4690246901
- instances
4690346902
- postgresVersion
4690446903
type: object

deploy/crd.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ spec:
395395
type: string
396396
destination:
397397
type: string
398+
error:
399+
type: string
398400
image:
399401
type: string
400402
jobName:
@@ -766,6 +768,8 @@ spec:
766768
backups:
767769
description: PostgreSQL backup configuration
768770
properties:
771+
enabled:
772+
type: boolean
769773
pgbackrest:
770774
description: pgBackRest archive configuration
771775
properties:
@@ -5948,8 +5952,6 @@ spec:
59485952
trackLatestRestorableTime:
59495953
description: Enable tracking latest restorable time
59505954
type: boolean
5951-
required:
5952-
- pgbackrest
59535955
type: object
59545956
crVersion:
59555957
description: |-
@@ -31571,8 +31573,6 @@ spec:
3157131573
type: object
3157231574
type: object
3157331575
type: object
31574-
required:
31575-
- repos
3157631576
type: object
3157731577
snapshots:
3157831578
description: VolumeSnapshot configuration
@@ -46898,7 +46898,6 @@ spec:
4689846898
- name
4689946899
x-kubernetes-list-type: map
4690046900
required:
46901-
- backups
4690246901
- instances
4690346902
- postgresVersion
4690446903
type: object

0 commit comments

Comments
 (0)