Skip to content

Commit b850b55

Browse files
upgrade to latest dependencies (#945)
bumping knative.dev/pkg 5e2512c...7681e80: > 7681e80 handle no views in the context (# 3196) > 5abfb10 [injection/sharedmain] OTel Support (# 3190) Signed-off-by: Knative Automation <automation@knative.team>
1 parent 520d5a5 commit b850b55

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
k8s.io/code-generator v0.33.1
1212
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
1313
knative.dev/hack v0.0.0-20250514121446-f525e187efdc
14-
knative.dev/pkg v0.0.0-20250626040505-5e2512c7127f
14+
knative.dev/pkg v0.0.0-20250627005806-7681e80bae5f
1515
)
1616

1717
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,8 @@ k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJ
680680
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
681681
knative.dev/hack v0.0.0-20250514121446-f525e187efdc h1:8HmclJlA0zNE/G1SkgdC3/IFSSyhaSz2iIhihU6YbEo=
682682
knative.dev/hack v0.0.0-20250514121446-f525e187efdc/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
683-
knative.dev/pkg v0.0.0-20250626040505-5e2512c7127f h1:V8/nxYaJ9A5oWS+qJ92xrfBoumZITLO5S8RU4L0uY+8=
684-
knative.dev/pkg v0.0.0-20250626040505-5e2512c7127f/go.mod h1:0s7tF3WffhdCzvTzaTEE092KeB4P3OYuRvwFuh5c7kk=
683+
knative.dev/pkg v0.0.0-20250627005806-7681e80bae5f h1:U2qhuJk5ezHFCkcKqh10lB2TckOoXNQAYj2qgFblXhA=
684+
knative.dev/pkg v0.0.0-20250627005806-7681e80bae5f/go.mod h1:sZkXsfyjetJqzHRkR3/8fP6K6iQJsub2W2rtYKTu6FU=
685685
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
686686
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
687687
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

vendor/knative.dev/pkg/system/env.go

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ limitations under the License.
1717
package system
1818

1919
import (
20+
"cmp"
2021
"fmt"
2122
"os"
2223
)
2324

2425
const (
2526
// NamespaceEnvKey is the environment variable that specifies the system namespace.
2627
NamespaceEnvKey = "SYSTEM_NAMESPACE"
28+
2729
// ResourceLabelEnvKey is the environment variable that specifies the system resource
28-
// label.
30+
// label. This label should be used to limit the number of configmaps that are watched
31+
// in the system namespace.
2932
ResourceLabelEnvKey = "SYSTEM_RESOURCE_LABEL"
3033
)
3134

@@ -60,3 +63,28 @@ import (
6063
func ResourceLabel() string {
6164
return os.Getenv(ResourceLabelEnvKey)
6265
}
66+
67+
// PodName will read various env vars to determine the name of the running
68+
// pod before falling back
69+
//
70+
// First it will read 'POD_NAME' this is expected to be populated using the
71+
// Kubernetes downward API.
72+
//
73+
// env:
74+
// - name: MY_POD_NAME
75+
// valueFrom:
76+
// fieldRef:
77+
// fieldPath: metadata.name
78+
//
79+
// As a fallback it will read HOSTNAME. This is undocumented
80+
// Kubernetes behaviour that podman, cri-o and containerd have
81+
// inherited from docker.
82+
//
83+
// If none of these env-vars is set PodName will return an
84+
// empty string
85+
func PodName() string {
86+
return cmp.Or(
87+
os.Getenv("POD_NAME"),
88+
os.Getenv("HOSTNAME"),
89+
)
90+
}

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ k8s.io/utils/trace
855855
# knative.dev/hack v0.0.0-20250514121446-f525e187efdc
856856
## explicit; go 1.21
857857
knative.dev/hack
858-
# knative.dev/pkg v0.0.0-20250626040505-5e2512c7127f
858+
# knative.dev/pkg v0.0.0-20250627005806-7681e80bae5f
859859
## explicit; go 1.24.0
860860
knative.dev/pkg/apis
861861
knative.dev/pkg/apis/duck

0 commit comments

Comments
 (0)