Skip to content

Commit 5a92b15

Browse files
authored
Merge pull request #368 from slauger/feat/bulk-fixes-2026-05
fix: bulk fixes for open issues and dependency updates
2 parents d154940 + fa40be2 commit 5a92b15

20 files changed

Lines changed: 220 additions & 114 deletions

File tree

charts/openvox-operator/templates/clusterrolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ roleRef:
2222
subjects:
2323
- kind: ServiceAccount
2424
name: {{ include "openvox-operator.serviceAccountName" . }}
25-
namespace: {{ .Release.Namespace }}
25+
namespace: {{ if eq .Values.scope.mode "namespace" }}{{ .Values.scope.watchNamespace | default .Release.Namespace }}{{ else }}{{ .Release.Namespace }}{{ end }}

charts/openvox-operator/tests/clusterrolebinding_test.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,18 @@ tests:
4040
- equal:
4141
path: subjects[0].namespace
4242
value: NAMESPACE
43+
44+
- it: should set subject namespace to watchNamespace in namespace mode
45+
set:
46+
scope:
47+
mode: namespace
48+
watchNamespace: other-namespace
49+
asserts:
50+
- isKind:
51+
of: RoleBinding
52+
- equal:
53+
path: metadata.namespace
54+
value: other-namespace
55+
- equal:
56+
path: subjects[0].namespace
57+
value: other-namespace

charts/openvox-stack/templates/pools.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
enabled: true
1414
hostname: {{ $entry.route.hostname }}
1515
gatewayRef:
16-
name: {{ $.Values.gateway.name }}
16+
name: {{ required "gateway.name is required when route.enabled is true" $.Values.gateway.name }}
1717
{{- with $.Values.gateway.sectionName }}
1818
sectionName: {{ . }}
1919
{{- end }}

charts/openvox-stack/tests/pools_test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,17 @@ tests:
106106
- equal:
107107
path: spec.route.injectDNSAltName
108108
value: true
109+
110+
- it: should fail when route enabled but gateway.name is empty
111+
set:
112+
pools:
113+
- name: ca
114+
service:
115+
type: ClusterIP
116+
port: 8140
117+
route:
118+
enabled: true
119+
hostname: puppet.example.com
120+
asserts:
121+
- failedTemplate:
122+
errorMessage: "gateway.name is required when route.enabled is true"

cmd/mock/main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import (
1515
"gopkg.in/yaml.v3"
1616
)
1717

18+
const maxBodySize = 10 * 1024 * 1024 // 10 MB
19+
1820
type storedReport struct {
1921
ReceivedAt time.Time `json:"received_at"`
2022
Body json.RawMessage `json:"body"`
@@ -275,7 +277,7 @@ func (s *server) handleReport(w http.ResponseWriter, r *http.Request) {
275277
return
276278
}
277279

278-
body, err := io.ReadAll(r.Body)
280+
body, err := io.ReadAll(io.LimitReader(r.Body, maxBodySize))
279281
if err != nil {
280282
http.Error(w, "failed to read body", http.StatusBadRequest)
281283
return
@@ -298,7 +300,7 @@ func (s *server) handlePDBCommand(w http.ResponseWriter, r *http.Request) {
298300
return
299301
}
300302

301-
body, err := io.ReadAll(r.Body)
303+
body, err := io.ReadAll(io.LimitReader(r.Body, maxBodySize))
302304
if err != nil {
303305
http.Error(w, "failed to read body", http.StatusBadRequest)
304306
return
@@ -379,7 +381,7 @@ func (s *server) handleHECEvent(w http.ResponseWriter, r *http.Request) {
379381
return
380382
}
381383

382-
body, err := io.ReadAll(r.Body)
384+
body, err := io.ReadAll(io.LimitReader(r.Body, maxBodySize))
383385
if err != nil {
384386
http.Error(w, "failed to read body", http.StatusBadRequest)
385387
return

go.mod

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ go 1.26.2
44

55
require (
66
gopkg.in/yaml.v3 v3.0.1
7-
k8s.io/api v0.36.0
8-
k8s.io/apimachinery v0.36.0
9-
k8s.io/client-go v0.36.0
10-
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5
11-
sigs.k8s.io/controller-runtime v0.24.0
7+
k8s.io/api v0.36.1
8+
k8s.io/apimachinery v0.36.1
9+
k8s.io/client-go v0.36.1
10+
k8s.io/utils v0.0.0-20260507154919-ff6756f316d2
11+
sigs.k8s.io/controller-runtime v0.24.1
1212
sigs.k8s.io/gateway-api v1.5.1
1313
)
1414

@@ -20,25 +20,25 @@ require (
2020
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
2121
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
2222
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
23-
github.com/fatih/color v1.18.0 // indirect
24-
github.com/fsnotify/fsnotify v1.9.0 // indirect
25-
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
23+
github.com/fatih/color v1.19.0 // indirect
24+
github.com/fsnotify/fsnotify v1.10.0 // indirect
25+
github.com/fxamacker/cbor/v2 v2.9.1 // indirect
2626
github.com/go-logr/logr v1.4.3 // indirect
2727
github.com/go-logr/zapr v1.3.0 // indirect
28-
github.com/go-openapi/jsonpointer v0.22.5 // indirect
28+
github.com/go-openapi/jsonpointer v0.23.1 // indirect
2929
github.com/go-openapi/jsonreference v0.21.5 // indirect
30-
github.com/go-openapi/swag v0.25.5 // indirect
31-
github.com/go-openapi/swag/cmdutils v0.25.5 // indirect
32-
github.com/go-openapi/swag/conv v0.25.5 // indirect
33-
github.com/go-openapi/swag/fileutils v0.25.5 // indirect
34-
github.com/go-openapi/swag/jsonname v0.25.5 // indirect
35-
github.com/go-openapi/swag/jsonutils v0.25.5 // indirect
36-
github.com/go-openapi/swag/loading v0.25.5 // indirect
37-
github.com/go-openapi/swag/mangling v0.25.5 // indirect
38-
github.com/go-openapi/swag/netutils v0.25.5 // indirect
39-
github.com/go-openapi/swag/stringutils v0.25.5 // indirect
40-
github.com/go-openapi/swag/typeutils v0.25.5 // indirect
41-
github.com/go-openapi/swag/yamlutils v0.25.5 // indirect
30+
github.com/go-openapi/swag v0.26.0 // indirect
31+
github.com/go-openapi/swag/cmdutils v0.26.0 // indirect
32+
github.com/go-openapi/swag/conv v0.26.0 // indirect
33+
github.com/go-openapi/swag/fileutils v0.26.0 // indirect
34+
github.com/go-openapi/swag/jsonname v0.26.0 // indirect
35+
github.com/go-openapi/swag/jsonutils v0.26.0 // indirect
36+
github.com/go-openapi/swag/loading v0.26.0 // indirect
37+
github.com/go-openapi/swag/mangling v0.26.0 // indirect
38+
github.com/go-openapi/swag/netutils v0.26.0 // indirect
39+
github.com/go-openapi/swag/stringutils v0.26.0 // indirect
40+
github.com/go-openapi/swag/typeutils v0.26.0 // indirect
41+
github.com/go-openapi/swag/yamlutils v0.26.0 // indirect
4242
github.com/gobuffalo/flect v1.0.3 // indirect
4343
github.com/google/cel-go v0.26.1 // indirect
4444
github.com/google/gnostic-models v0.7.1 // indirect
@@ -85,11 +85,11 @@ require (
8585
k8s.io/code-generator v0.36.0 // indirect
8686
k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect
8787
k8s.io/klog/v2 v2.140.0 // indirect
88-
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
89-
sigs.k8s.io/controller-tools v0.20.1 // indirect
88+
k8s.io/kube-openapi v0.0.0-20260427204847-8949caaa1199 // indirect
89+
sigs.k8s.io/controller-tools v0.21.0 // indirect
9090
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
9191
sigs.k8s.io/randfill v1.0.0 // indirect
92-
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
92+
sigs.k8s.io/structured-merge-diff/v6 v6.4.0 // indirect
9393
sigs.k8s.io/yaml v1.6.0 // indirect
9494
)
9595

0 commit comments

Comments
 (0)