Skip to content

Commit 2564b01

Browse files
authored
Merge branch 'main' into benjb/pgbouncer-log-validation
2 parents 1141e0f + d777eed commit 2564b01

36 files changed

+790
-667
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trim_trailing_whitespace = true
1414
indent_size = tab
1515
indent_style = tab
1616

17-
[*.{md,yml,yaml}]
17+
[*.{jq,md,yml,yaml}]
1818
indent_size = 2
1919
indent_style = space
2020

.github/workflows/codeql-analysis.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ on:
99
schedule:
1010
- cron: '10 18 * * 2'
1111

12-
env:
13-
# Use the Go toolchain installed by setup-go
14-
# https://github.com/actions/setup-go/issues/457
15-
GOTOOLCHAIN: local
16-
1712
jobs:
1813
analyze:
1914
if: ${{ github.repository == 'CrunchyData/postgres-operator' }}
@@ -25,7 +20,7 @@ jobs:
2520
runs-on: ubuntu-24.04
2621
steps:
2722
- uses: actions/checkout@v5
28-
- uses: actions/setup-go@v5
23+
- uses: actions/setup-go@v6
2924
with: { go-version: stable }
3025

3126
- name: Initialize CodeQL

.github/workflows/govulncheck.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
env:
1111
# Use the Go toolchain installed by setup-go
1212
# https://github.com/actions/setup-go/issues/457
13+
#
14+
# TODO(govulncheck): Remove when "golang/govulncheck-action" uses "actions/setup-go" v6 or newer
1315
GOTOOLCHAIN: local
1416

1517
jobs:

.github/workflows/lint.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ name: Linters
33
on:
44
pull_request:
55

6-
env:
7-
# Use the Go toolchain installed by setup-go
8-
# https://github.com/actions/setup-go/issues/457
9-
GOTOOLCHAIN: local
10-
116
jobs:
127
golangci-lint:
138
runs-on: ubuntu-24.04
@@ -16,7 +11,7 @@ jobs:
1611
checks: write
1712
steps:
1813
- uses: actions/checkout@v5
19-
- uses: actions/setup-go@v5
14+
- uses: actions/setup-go@v6
2015
with: { go-version: stable }
2116

2217
- uses: golangci/golangci-lint-action@v8

.github/workflows/test.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ on:
66
branches:
77
- main
88

9-
env:
10-
# Use the Go toolchain installed by setup-go
11-
# https://github.com/actions/setup-go/issues/457
12-
GOTOOLCHAIN: local
13-
149
jobs:
1510
go-test:
1611
runs-on: ubuntu-24.04
1712
steps:
1813
- uses: actions/checkout@v5
19-
- uses: actions/setup-go@v5
14+
- uses: actions/setup-go@v6
2015
with: { go-version: stable }
2116

2217
- name: Ensure go.mod is tidy
@@ -34,7 +29,7 @@ jobs:
3429
kubernetes: ['default']
3530
steps:
3631
- uses: actions/checkout@v5
37-
- uses: actions/setup-go@v5
32+
- uses: actions/setup-go@v6
3833
with: { go-version: stable }
3934

4035
- run: go mod download
@@ -58,10 +53,10 @@ jobs:
5853
strategy:
5954
fail-fast: false
6055
matrix:
61-
kubernetes: [v1.33, v1.30]
56+
kubernetes: [v1.30, v1.33]
6257
steps:
6358
- uses: actions/checkout@v5
64-
- uses: actions/setup-go@v5
59+
- uses: actions/setup-go@v6
6560
with: { go-version: stable }
6661

6762
- name: Start k3s
@@ -92,10 +87,10 @@ jobs:
9287
strategy:
9388
fail-fast: false
9489
matrix:
95-
kubernetes: [v1.33, v1.30]
90+
kubernetes: [v1.30, v1.33]
9691
steps:
9792
- uses: actions/checkout@v5
98-
- uses: actions/setup-go@v5
93+
- uses: actions/setup-go@v6
9994
with: { go-version: stable }
10095

10196
- name: Start k3s
@@ -175,7 +170,7 @@ jobs:
175170
- kubernetes-k3d
176171
steps:
177172
- uses: actions/checkout@v5
178-
- uses: actions/setup-go@v5
173+
- uses: actions/setup-go@v6
179174
with: { go-version: stable }
180175
- uses: actions/download-artifact@v5
181176
with: { path: download }

.github/workflows/trivy.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ on:
88
- main
99

1010
env:
11-
# Use the Go toolchain installed by setup-go
12-
# https://github.com/actions/setup-go/issues/457
13-
GOTOOLCHAIN: local
14-
1511
# Use the committed Trivy configuration files.
1612
TRIVY_IGNOREFILE: .trivyignore.yaml
1713
TRIVY_SECRET_CONFIG: trivy-secret.yaml
@@ -48,7 +44,7 @@ jobs:
4844
- uses: actions/checkout@v5
4945

5046
# Trivy needs a populated Go module cache to detect Go module licenses.
51-
- uses: actions/setup-go@v5
47+
- uses: actions/setup-go@v6
5248
with: { go-version: stable }
5349
- run: go mod download
5450

.golangci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ linters:
9090
desc: Should be used only in tests.
9191
- pkg: testing/*
9292
desc: The "testing" packages should be used only in tests.
93+
- pkg: github.com/crunchydata/postgres-operator/internal/crd/*
94+
desc: The "internal/crd" packages should be used only in tests.
9395
- pkg: github.com/crunchydata/postgres-operator/internal/testing/*
9496
desc: The "internal/testing" packages should be used only in tests.
9597
- pkg: k8s.io/client-go/discovery

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -232,24 +232,24 @@ generate: generate-rbac
232232

233233
.PHONY: generate-crd
234234
generate-crd: ## Generate Custom Resource Definitions (CRDs)
235-
$(CONTROLLER) \
236-
crd:crdVersions='v1' \
237-
paths='./pkg/apis/...' \
238-
output:dir='config/crd/bases' # {directory}/{group}_{plural}.yaml
235+
$(CONTROLLER) $(\
236+
) crd paths='./pkg/apis/...' $(\
237+
) output:dir='config/crd/bases' # {directory}/{group}_{plural}.yaml
238+
$(GO) generate ./internal/crd
239239

240240
.PHONY: generate-collector
241241
generate-collector: ## Generate OTel Collector files
242242
$(GO) generate ./internal/collector
243243

244244
.PHONY: generate-deepcopy
245245
generate-deepcopy: ## Generate DeepCopy functions
246-
$(CONTROLLER) \
247-
object:headerFile='hack/boilerplate.go.txt' \
248-
paths='./pkg/apis/postgres-operator.crunchydata.com/...'
246+
$(CONTROLLER) $(\
247+
) object:headerFile='hack/boilerplate.go.txt' $(\
248+
) paths='./pkg/apis/postgres-operator.crunchydata.com/...'
249249

250250
.PHONY: generate-rbac
251251
generate-rbac: ## Generate RBAC
252-
$(CONTROLLER) \
253-
rbac:roleName='postgres-operator' \
254-
paths='./cmd/...' paths='./internal/...' \
255-
output:dir='config/rbac' # {directory}/role.yaml
252+
$(CONTROLLER) $(\
253+
) rbac:roleName='postgres-operator' $(\
254+
) paths='./cmd/...' paths='./internal/...' $(\
255+
) output:dir='config/rbac' # {directory}/role.yaml

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ spec:
133133
id
134134
type: string
135135
storage:
136-
anyOf:
137-
- type: integer
138-
- type: string
139136
description: |-
140137
The amount of storage available to the cluster in gigabytes.
141138
The amount must be an integer, followed by Gi (gibibytes) or G (gigabytes) to match Kubernetes conventions.
@@ -277,9 +274,6 @@ spec:
277274
description: State of cluster in Bridge.
278275
type: string
279276
storage:
280-
anyOf:
281-
- type: integer
282-
- type: string
283277
description: The amount of storage available to the cluster.
284278
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
285279
x-kubernetes-int-or-string: true

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

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,9 +1201,6 @@ spec:
12011201
volumes, optional for env vars'
12021202
type: string
12031203
divisor:
1204-
anyOf:
1205-
- type: integer
1206-
- type: string
12071204
description: Specifies the output format of
12081205
the exposed resources, defaults to "1"
12091206
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
@@ -1501,9 +1498,6 @@ spec:
15011498
properties:
15021499
limits:
15031500
additionalProperties:
1504-
anyOf:
1505-
- type: integer
1506-
- type: string
15071501
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
15081502
x-kubernetes-int-or-string: true
15091503
description: |-
@@ -1512,9 +1506,6 @@ spec:
15121506
type: object
15131507
requests:
15141508
additionalProperties:
1515-
anyOf:
1516-
- type: integer
1517-
- type: string
15181509
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
15191510
x-kubernetes-int-or-string: true
15201511
description: |-
@@ -1762,9 +1753,6 @@ spec:
17621753
optional for env vars'
17631754
type: string
17641755
divisor:
1765-
anyOf:
1766-
- type: integer
1767-
- type: string
17681756
description: Specifies the output format of
17691757
the exposed resources, defaults to "1"
17701758
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
@@ -2036,9 +2024,6 @@ spec:
20362024
for volumes, optional for env vars'
20372025
type: string
20382026
divisor:
2039-
anyOf:
2040-
- type: integer
2041-
- type: string
20422027
description: Specifies the output format
20432028
of the exposed resources, defaults to
20442029
"1"
@@ -2344,9 +2329,6 @@ spec:
23442329
x-kubernetes-list-type: map
23452330
limits:
23462331
additionalProperties:
2347-
anyOf:
2348-
- type: integer
2349-
- type: string
23502332
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
23512333
x-kubernetes-int-or-string: true
23522334
description: |-
@@ -2355,9 +2337,6 @@ spec:
23552337
type: object
23562338
requests:
23572339
additionalProperties:
2358-
anyOf:
2359-
- type: integer
2360-
- type: string
23612340
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
23622341
x-kubernetes-int-or-string: true
23632342
description: |-
@@ -2422,9 +2401,6 @@ spec:
24222401
x-kubernetes-list-type: map
24232402
limits:
24242403
additionalProperties:
2425-
anyOf:
2426-
- type: integer
2427-
- type: string
24282404
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
24292405
x-kubernetes-int-or-string: true
24302406
description: |-
@@ -2433,9 +2409,6 @@ spec:
24332409
type: object
24342410
requests:
24352411
additionalProperties:
2436-
anyOf:
2437-
- type: integer
2438-
- type: string
24392412
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
24402413
x-kubernetes-int-or-string: true
24412414
description: |-
@@ -2648,12 +2621,10 @@ spec:
26482621
type: array
26492622
x-kubernetes-list-type: set
26502623
name:
2651-
allOf:
2652-
- maxLength: 63
2653-
- maxLength: 55
26542624
description: |-
26552625
The name of the directory in which to mount this volume.
26562626
Volumes are mounted in containers at `/volumes/{name}`.
2627+
maxLength: 55
26572628
minLength: 1
26582629
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
26592630
type: string

0 commit comments

Comments
 (0)