Skip to content

Commit f5d0f79

Browse files
authored
[release-v1.17] Update func to latest (#865)
/cc @jrangelramos @matejvasek
1 parent 82b0825 commit f5d0f79

File tree

8 files changed

+17
-18
lines changed

8 files changed

+17
-18
lines changed

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,10 @@ require (
297297
)
298298

299299
replace (
300-
301300
// this is required bacause of bad dep in github.com/openshift-pipelines/pipelines-as-code
302301
github.com/imdario/mergo => dario.cat/mergo v1.0.1
303302
k8s.io/client-go => k8s.io/client-go v0.31.4
304303

305-
knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251014203810-38f804ee68a5
304+
knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251021182055-efe011186788
306305
knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250909142807-417eafe6248c
307306
)

go.sum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaL
805805
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
806806
github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250909142807-417eafe6248c h1:l9OrMZfFgGkd5G/4hBCM4ewUraowZgO4uDhsuAq3y38=
807807
github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250909142807-417eafe6248c/go.mod h1:fWY2DpDeE7/eSXM2HSD6Rke9A0vWi3uGlnU1EpQdyHI=
808-
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251014203810-38f804ee68a5 h1:6GObNjfl6zEj0GwTEVHpVQioKnBWTjcWJ8TBao0xfs0=
808+
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251021182055-efe011186788 h1:3/DWeKvPgK5aTO2FIKK713D14nuq4O2Cwbsvquw+cnQ=
809809
github.com/openshift-pipelines/pipelines-as-code v0.31.0 h1:dUUvnwCrhSmr3IYjsywLD7QTNAINetFoLCIO4529nOk=
810810
github.com/openshift/source-to-image v1.5.0 h1:M2eVH7cFVbVRNPFYKifDSCWSWRkCVOuY7LqzdTAhHPY=
811811
github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg=

go.work.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,6 +1636,8 @@ github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqi
16361636
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
16371637
github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
16381638
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251014203810-38f804ee68a5/go.mod h1:ldTw8OItgpxWhxxAsqt/RgWvdrtE/iegOI3K4/prNso=
1639+
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251021182055-efe011186788 h1:3/DWeKvPgK5aTO2FIKK713D14nuq4O2Cwbsvquw+cnQ=
1640+
github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251021182055-efe011186788/go.mod h1:ldTw8OItgpxWhxxAsqt/RgWvdrtE/iegOI3K4/prNso=
16391641
github.com/openshift-pipelines/pipelines-as-code v0.31.0/go.mod h1:74yRkJfqVzMp2iiq3IBm8Lt1q1EAHMIHb53/Au+2IVM=
16401642
github.com/openshift/source-to-image v1.5.0/go.mod h1:nEXLasYzwqaiFwD9kk3EjmUX4UJN96u/ucjbvOvSvbY=
16411643
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=

openshift/ci-operator/knative-images/cli-artifacts/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WORKDIR /workspace
88
# Allow copying from higher directory when context is limited
99
COPY . .
1010

11-
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel9@sha256:607e50dd3a9b61d57d125c47a7977c40c4f781bfab01a852a08b40fe42f2b893
11+
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel9@sha256:919aed0783ee6e333f619a7fee1c8ea67b6184c19d0ba1ff75f56eec6cb9042b
1212
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel9@sha256:2d8cfab33f1c46b2d4510ea4b56a09e12b8bcf07c0eb055e84ebc077ec730145
1313
# Build binaries
1414
# RUN make build-cross-package

openshift/ci-operator/knative-images/kn/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COPY . .
1010
ENV CGO_ENABLED=1
1111
ENV GOEXPERIMENT=strictfipsruntime
1212

13-
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel9@sha256:607e50dd3a9b61d57d125c47a7977c40c4f781bfab01a852a08b40fe42f2b893
13+
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel9@sha256:919aed0783ee6e333f619a7fee1c8ea67b6184c19d0ba1ff75f56eec6cb9042b
1414
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel9@sha256:2d8cfab33f1c46b2d4510ea4b56a09e12b8bcf07c0eb055e84ebc077ec730145
1515
RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/kn
1616

vendor/knative.dev/func/cmd/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ func (c buildConfig) clientOptions() ([]fn.Option, error) {
386386
if c.Builder == builders.Host {
387387
o = append(o,
388388
fn.WithBuilder(oci.NewBuilder(builders.Host, c.Verbose)),
389-
fn.WithPusher(oci.NewPusher(c.RegistryInsecure, false, c.Verbose)))
389+
fn.WithPusher(oci.NewPusher(c.RegistryInsecure, false, c.Verbose, newTransport(c.RegistryInsecure))))
390390
} else if c.Builder == builders.Pack {
391391
o = append(o,
392392
fn.WithBuilder(pack.NewBuilder(

vendor/knative.dev/func/pkg/oci/pusher.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package oci
22

33
import (
44
"context"
5-
"crypto/tls"
65
"fmt"
76
"net/http"
87
"os"
@@ -32,15 +31,21 @@ type Pusher struct {
3231

3332
updates chan v1.Update
3433
done chan bool
34+
35+
transport http.RoundTripper
3536
}
3637

37-
func NewPusher(insecure, anon, verbose bool) *Pusher {
38+
func NewPusher(insecure, anon, verbose bool, t http.RoundTripper) *Pusher {
39+
if t == nil {
40+
t = remote.DefaultTransport
41+
}
3842
return &Pusher{
3943
Insecure: insecure,
4044
Anonymous: anon,
4145
Verbose: verbose,
4246
updates: make(chan v1.Update, 10),
4347
done: make(chan bool, 1),
48+
transport: t,
4449
}
4550
}
4651

@@ -124,14 +129,7 @@ func (p *Pusher) writeIndex(ctx context.Context, ref name.Reference, ii v1.Image
124129
oo := []remote.Option{
125130
remote.WithContext(ctx),
126131
remote.WithProgress(p.updates),
127-
}
128-
129-
if p.Insecure {
130-
t := remote.DefaultTransport.(*http.Transport).Clone()
131-
t.TLSClientConfig = &tls.Config{
132-
InsecureSkipVerify: true,
133-
}
134-
oo = append(oo, remote.WithTransport(t))
132+
remote.WithTransport(p.transport),
135133
}
136134

137135
if !p.Anonymous {

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,7 @@ knative.dev/eventing-kafka-broker/control-plane/pkg/apis/sources/v1beta1
23822382
knative.dev/eventing-kafka-broker/control-plane/pkg/client/clientset/versioned/scheme
23832383
knative.dev/eventing-kafka-broker/control-plane/pkg/client/clientset/versioned/typed/sources/v1beta1
23842384
knative.dev/eventing-kafka-broker/control-plane/pkg/client/clientset/versioned/typed/sources/v1beta1/fake
2385-
# knative.dev/func v1.17.0 => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251014203810-38f804ee68a5
2385+
# knative.dev/func v1.17.0 => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251021182055-efe011186788
23862386
## explicit; go 1.23.0
23872387
knative.dev/func/cmd
23882388
knative.dev/func/cmd/prompt
@@ -2651,5 +2651,5 @@ sigs.k8s.io/yaml/goyaml.v2
26512651
sigs.k8s.io/yaml/goyaml.v3
26522652
# github.com/imdario/mergo => dario.cat/mergo v1.0.1
26532653
# k8s.io/client-go => k8s.io/client-go v0.31.4
2654-
# knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251014203810-38f804ee68a5
2654+
# knative.dev/func => github.com/openshift-knative/kn-plugin-func v1.1.3-0.20251021182055-efe011186788
26552655
# knative.dev/kn-plugin-event => github.com/openshift-knative/kn-plugin-event v0.43.1-0.20250909142807-417eafe6248c

0 commit comments

Comments
 (0)