Skip to content

Commit aa1419d

Browse files
Merge pull request #498 from openshift-bot/synchronize-upstream
NO-ISSUE: Synchronize From Upstream Repositories
2 parents f69276f + 166bae2 commit aa1419d

File tree

33 files changed

+947
-73
lines changed

33 files changed

+947
-73
lines changed

.bingo/Variables.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ $(CRD_REF_DOCS): $(BINGO_DIR)/crd-ref-docs.mod
4141
@echo "(re)installing $(GOBIN)/crd-ref-docs-v0.1.0"
4242
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=crd-ref-docs.mod -o=$(GOBIN)/crd-ref-docs-v0.1.0 "github.com/elastic/crd-ref-docs"
4343

44+
GOJQ := $(GOBIN)/gojq-v0.12.17
45+
$(GOJQ): $(BINGO_DIR)/gojq.mod
46+
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
47+
@echo "(re)installing $(GOBIN)/gojq-v0.12.17"
48+
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=gojq.mod -o=$(GOBIN)/gojq-v0.12.17 "github.com/itchyny/gojq/cmd/gojq"
49+
4450
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v2.1.6
4551
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
4652
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.

.bingo/gojq.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
2+
3+
go 1.24.4
4+
5+
require github.com/itchyny/gojq v0.12.17 // cmd/gojq

.bingo/gojq.sum

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
github.com/itchyny/gojq v0.12.17 h1:8av8eGduDb5+rvEdaOO+zQUjA04MS0m3Ps8HiD+fceg=
2+
github.com/itchyny/gojq v0.12.17/go.mod h1:WBrEMkgAfAGO1LUcGOckBl5O726KPp+OlkKug0I/FEY=
3+
github.com/itchyny/timefmt-go v0.1.6 h1:ia3s54iciXDdzWzwaVKXZPbiXzxxnv1SPGFfM/myJ5Q=
4+
github.com/itchyny/timefmt-go v0.1.6/go.mod h1:RRDZYC5s9ErkjQvTvvU7keJjxUYzIISJGxm9/mAERQg=
5+
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
6+
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
7+
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
8+
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
9+
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
10+
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
11+
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
12+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
13+
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
14+
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
15+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
16+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
17+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

.bingo/variables.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ CRD_DIFF="${GOBIN}/crd-diff-v0.2.0"
1616

1717
CRD_REF_DOCS="${GOBIN}/crd-ref-docs-v0.1.0"
1818

19+
GOJQ="${GOBIN}/gojq-v0.12.17"
20+
1921
GOLANGCI_LINT="${GOBIN}/golangci-lint-v2.1.6"
2022

2123
GORELEASER="${GOBIN}/goreleaser-v1.26.2"

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyI
178178
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) object:headerFile="hack/boilerplate.go.txt" paths="./..."
179179

180180
.PHONY: verify
181-
verify: k8s-pin kind-verify-versions fmt generate manifests crd-ref-docs #HELP Verify all generated code is up-to-date. Runs k8s-pin instead of just tidy.
181+
verify: k8s-pin kind-verify-versions fmt generate manifests update-tls-profiles crd-ref-docs #HELP Verify all generated code is up-to-date. Runs k8s-pin instead of just tidy.
182182
git diff --exit-code
183183

184184
.PHONY: fix-lint
@@ -189,6 +189,10 @@ fix-lint: $(GOLANGCI_LINT) #EXHELP Fix lint issues
189189
fmt: #EXHELP Formats code
190190
go fmt ./...
191191

192+
.PHONY: update-tls-profiles
193+
update-tls-profiles: $(GOJQ) #EXHELP Update TLS profiles from the Mozilla wiki
194+
env JQ=$(GOJQ) hack/tools/update-tls-profiles.sh
195+
192196
.PHONY: verify-crd-compatibility
193197
CRD_DIFF_ORIGINAL_REF := git://main?path=
194198
CRD_DIFF_UPDATED_REF := file://

cmd/catalogd/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import (
6464
imageutil "github.com/operator-framework/operator-controller/internal/shared/util/image"
6565
"github.com/operator-framework/operator-controller/internal/shared/util/pullsecretcache"
6666
sautil "github.com/operator-framework/operator-controller/internal/shared/util/sa"
67+
"github.com/operator-framework/operator-controller/internal/shared/util/tlsprofiles"
6768
"github.com/operator-framework/operator-controller/internal/shared/version"
6869
)
6970

@@ -142,6 +143,7 @@ func init() {
142143
klog.InitFlags(flag.CommandLine)
143144
flags.AddGoFlagSet(flag.CommandLine)
144145
features.CatalogdFeatureGate.AddFlag(flags)
146+
tlsprofiles.AddFlags(flags)
145147

146148
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
147149
utilruntime.Must(ocv1.AddToScheme(scheme))
@@ -216,12 +218,18 @@ func run(ctx context.Context) error {
216218
// For details, see: https://github.com/kubernetes/kubernetes/issues/121197
217219
config.NextProtos = []string{"http/1.1"}
218220
}
221+
tlsProfile, err := tlsprofiles.GetTLSConfigFunc()
222+
if err != nil {
223+
setupLog.Error(err, "failed to get TLS profile")
224+
return err
225+
}
219226

220227
// Create webhook server and configure TLS
221228
webhookServer := crwebhook.NewServer(crwebhook.Options{
222229
Port: cfg.webhookPort,
223230
TLSOpts: []func(*tls.Config){
224231
tlsOpts,
232+
tlsProfile,
225233
},
226234
})
227235

@@ -233,7 +241,7 @@ func run(ctx context.Context) error {
233241
metricsServerOptions.SecureServing = true
234242
metricsServerOptions.FilterProvider = filters.WithAuthenticationAndAuthorization
235243

236-
metricsServerOptions.TLSOpts = append(metricsServerOptions.TLSOpts, tlsOpts)
244+
metricsServerOptions.TLSOpts = append(metricsServerOptions.TLSOpts, tlsOpts, tlsProfile)
237245
} else {
238246
// Note that the metrics server is not serving if the BindAddress is set to "0".
239247
// Therefore, the metrics server is disabled by default. It is only enabled

cmd/operator-controller/main.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ import (
8282
imageutil "github.com/operator-framework/operator-controller/internal/shared/util/image"
8383
"github.com/operator-framework/operator-controller/internal/shared/util/pullsecretcache"
8484
sautil "github.com/operator-framework/operator-controller/internal/shared/util/sa"
85+
"github.com/operator-framework/operator-controller/internal/shared/util/tlsprofiles"
8586
"github.com/operator-framework/operator-controller/internal/shared/version"
8687
)
8788

@@ -166,6 +167,9 @@ func init() {
166167
//add feature gate flags to flagset
167168
features.OperatorControllerFeatureGate.AddFlag(flags)
168169

170+
//add TLS flags
171+
tlsprofiles.AddFlags(flags)
172+
169173
ctrl.SetLogger(klog.NewKlogr())
170174
}
171175
func validateMetricsFlags() error {
@@ -274,6 +278,12 @@ func run() error {
274278
// the risks. More info https://github.com/golang/go/issues/63417
275279
config.NextProtos = []string{"http/1.1"}
276280
})
281+
tlsProfile, err := tlsprofiles.GetTLSConfigFunc()
282+
if err != nil {
283+
setupLog.Error(err, "failed to get TLS profile")
284+
return err
285+
}
286+
metricsServerOptions.TLSOpts = append(metricsServerOptions.TLSOpts, tlsProfile)
277287
} else {
278288
// Note that the metrics server is not serving if the BindAddress is set to "0".
279289
// Therefore, the metrics server is disabled by default. It is only enabled

commitchecker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
expectedMergeBase: 35da385077935545a4eaadc338015e249a6df211
1+
expectedMergeBase: 6604f2a4e24ca0c4abce99389b1e5dbbe8d8dbfa
22
upstreamBranch: main
33
upstreamOrg: operator-framework
44
upstreamRepo: operator-controller

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ require (
2020
github.com/opencontainers/image-spec v1.1.1
2121
github.com/operator-framework/api v0.35.0
2222
github.com/operator-framework/helm-operator-plugins v0.8.0
23-
github.com/operator-framework/operator-registry v1.59.0
23+
github.com/operator-framework/operator-registry v1.60.0
2424
github.com/prometheus/client_golang v1.23.2
25-
github.com/prometheus/common v0.66.1
25+
github.com/prometheus/common v0.67.1
2626
github.com/spf13/cobra v1.10.1
27+
github.com/spf13/pflag v1.0.10
2728
github.com/stretchr/testify v1.11.1
2829
go.podman.io/image/v5 v5.37.0
2930
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b
@@ -199,7 +200,6 @@ require (
199200
github.com/sirupsen/logrus v1.9.3 // indirect
200201
github.com/smallstep/pkcs7 v0.2.1 // indirect
201202
github.com/spf13/cast v1.7.1 // indirect
202-
github.com/spf13/pflag v1.0.10 // indirect
203203
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect
204204
github.com/stoewer/go-strcase v1.3.1 // indirect
205205
github.com/stretchr/objx v0.5.2 // indirect
@@ -236,7 +236,7 @@ require (
236236
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
237237
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
238238
google.golang.org/grpc v1.75.1 // indirect
239-
google.golang.org/protobuf v1.36.9 // indirect
239+
google.golang.org/protobuf v1.36.10 // indirect
240240
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
241241
gopkg.in/inf.v0 v0.9.1 // indirect
242242
gopkg.in/warnings.v0 v0.1.2 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ github.com/operator-framework/helm-operator-plugins v0.8.0 h1:0f6HOQC5likkf0b/Ov
394394
github.com/operator-framework/helm-operator-plugins v0.8.0/go.mod h1:Sc+8bE38xTCgCChBUvtq/PxatEg9fAypr7S5iAw8nlA=
395395
github.com/operator-framework/operator-lib v0.17.0 h1:cbz51wZ9+GpWR1ZYP4CSKSSBxDlWxmmnseaHVZZjZt4=
396396
github.com/operator-framework/operator-lib v0.17.0/go.mod h1:TGopBxIE8L6E/Cojzo26R3NFp1eNlqhQNmzqhOblaLw=
397-
github.com/operator-framework/operator-registry v1.59.0 h1:SQhT0qMTYJXqStNhBOYXmLAMpS3eszzbcXAg5NLgJu8=
398-
github.com/operator-framework/operator-registry v1.59.0/go.mod h1:QE1RRQGe+iau8sfY10DbP3+eoahH0G0l+coYrnEzJgI=
397+
github.com/operator-framework/operator-registry v1.60.0 h1:eUP14WThVTNx+/5hQR9Jyg0nxbf5cOg7hK/GgaOA5Tg=
398+
github.com/operator-framework/operator-registry v1.60.0/go.mod h1:PojPivJbKZgD9RG77JWxFpQRo3iCoUn6WR3aTiS6HBI=
399399
github.com/otiai10/copy v1.14.1 h1:5/7E6qsUMBaH5AnQ0sSLzzTg1oTECmcCmT6lvF45Na8=
400400
github.com/otiai10/copy v1.14.1/go.mod h1:oQwrEDDOci3IM8dJF0d8+jnbfPDllW6vUjNc3DoZm9I=
401401
github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs=
@@ -418,8 +418,8 @@ github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UH
418418
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
419419
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
420420
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
421-
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
422-
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
421+
github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI=
422+
github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q=
423423
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
424424
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
425425
github.com/redis/go-redis/extra/rediscmd/v9 v9.10.0 h1:uTiEyEyfLhkw678n6EulHVto8AkcXVr8zUcBJNZ0ark=
@@ -727,8 +727,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
727727
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
728728
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
729729
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
730-
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
731-
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
730+
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
731+
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
732732
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
733733
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
734734
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

0 commit comments

Comments
 (0)