Skip to content

[main] Upgrade to latest dependencies #945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
k8s.io/code-generator v0.33.1
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
knative.dev/hack v0.0.0-20250514121446-f525e187efdc
knative.dev/pkg v0.0.0-20250626040505-5e2512c7127f
knative.dev/pkg v0.0.0-20250627005806-7681e80bae5f
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJ
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20250514121446-f525e187efdc h1:8HmclJlA0zNE/G1SkgdC3/IFSSyhaSz2iIhihU6YbEo=
knative.dev/hack v0.0.0-20250514121446-f525e187efdc/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
knative.dev/pkg v0.0.0-20250626040505-5e2512c7127f h1:V8/nxYaJ9A5oWS+qJ92xrfBoumZITLO5S8RU4L0uY+8=
knative.dev/pkg v0.0.0-20250626040505-5e2512c7127f/go.mod h1:0s7tF3WffhdCzvTzaTEE092KeB4P3OYuRvwFuh5c7kk=
knative.dev/pkg v0.0.0-20250627005806-7681e80bae5f h1:U2qhuJk5ezHFCkcKqh10lB2TckOoXNQAYj2qgFblXhA=
knative.dev/pkg v0.0.0-20250627005806-7681e80bae5f/go.mod h1:sZkXsfyjetJqzHRkR3/8fP6K6iQJsub2W2rtYKTu6FU=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
30 changes: 29 additions & 1 deletion vendor/knative.dev/pkg/system/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ limitations under the License.
package system

import (
"cmp"
"fmt"
"os"
)

const (
// NamespaceEnvKey is the environment variable that specifies the system namespace.
NamespaceEnvKey = "SYSTEM_NAMESPACE"

// ResourceLabelEnvKey is the environment variable that specifies the system resource
// label.
// label. This label should be used to limit the number of configmaps that are watched
// in the system namespace.
ResourceLabelEnvKey = "SYSTEM_RESOURCE_LABEL"
)

Expand Down Expand Up @@ -60,3 +63,28 @@ import (
func ResourceLabel() string {
return os.Getenv(ResourceLabelEnvKey)
}

// PodName will read various env vars to determine the name of the running
// pod before falling back
//
// First it will read 'POD_NAME' this is expected to be populated using the
// Kubernetes downward API.
//
// env:
// - name: MY_POD_NAME
// valueFrom:
// fieldRef:
// fieldPath: metadata.name
//
// As a fallback it will read HOSTNAME. This is undocumented
// Kubernetes behaviour that podman, cri-o and containerd have
// inherited from docker.
//
// If none of these env-vars is set PodName will return an
// empty string
func PodName() string {
return cmp.Or(
os.Getenv("POD_NAME"),
os.Getenv("HOSTNAME"),
)
}
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ k8s.io/utils/trace
# knative.dev/hack v0.0.0-20250514121446-f525e187efdc
## explicit; go 1.21
knative.dev/hack
# knative.dev/pkg v0.0.0-20250626040505-5e2512c7127f
# knative.dev/pkg v0.0.0-20250627005806-7681e80bae5f
## explicit; go 1.24.0
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down
Loading