Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/serving e865aa7...2e7d6e4:%0A  > 2e7d6e4 Update community files (# 14128)%0A  > 63fa389 Allow to set QP resources per service (# 14038)%0A  > 9310e4d Update net-kourier nightly (# 14125)%0A  > 0462ce6 Update net-istio nightly (# 14126)%0A  > 2813b9a Update net-gateway-api nightly (# 14119)%0A  > eaf666e Update net-istio nightly (# 14116)%0A  > 53169cd Update net-istio nightly (# 14112)%0Abumping knative.dev/pkg eb63a40...6eb4b40:%0A  > 6eb4b40 Update community files (# 2760)%0Abumping knative.dev/networking b9dd5c2...91821ae:%0A  > 91821ae Update community files (# 819)%0A  > 3a75df5 upgrade to latest dependencies (# 817)%0Abumping knative.dev/hack d7586a2...fc42790:%0A  > fc42790 Update community files (# 296)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Jun 28, 2023
1 parent c946393 commit 31c12be
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 29 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ require (
k8s.io/api v0.26.5
k8s.io/apimachinery v0.26.5
k8s.io/client-go v0.26.5
knative.dev/hack v0.0.0-20230615155948-d7586a218601
knative.dev/networking v0.0.0-20230616133350-b9dd5c201e19
knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0
knative.dev/serving v0.37.1-0.20230620145233-e865aa7e4e38
knative.dev/hack v0.0.0-20230628110129-fc42790854e8
knative.dev/networking v0.0.0-20230628105954-91821ae96399
knative.dev/pkg v0.0.0-20230628105954-6eb4b40a9a30
knative.dev/serving v0.37.1-0.20230628110702-2e7d6e4a0233
)

require (
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -692,14 +692,14 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20230615155948-d7586a218601 h1:yMe29SMHrAIt3+J+APvf4WVP6cW7ZDtUhh5uxD5ERdA=
knative.dev/hack v0.0.0-20230615155948-d7586a218601/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20230616133350-b9dd5c201e19 h1:yZXjdJbr+HgwjmGRkZ2QQRYB9r7fhVklStuTEMm6l6w=
knative.dev/networking v0.0.0-20230616133350-b9dd5c201e19/go.mod h1:xYtCGVLsoxLEHxUEQxVa0Ut7R/M5x2E49bHzEj09M5w=
knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0 h1:weQWWxEEbNOPuL4qtGiBZuMSFhcjF/Cu163uktd/xFE=
knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk=
knative.dev/serving v0.37.1-0.20230620145233-e865aa7e4e38 h1:7Izguhzhpjl5XjGcKCYHTsXzDiobSDcrGTqlcxoepkU=
knative.dev/serving v0.37.1-0.20230620145233-e865aa7e4e38/go.mod h1:G5sRe4RpjxCaNdRI/EQagvtCioMtjOIdfoboauNMpSk=
knative.dev/hack v0.0.0-20230628110129-fc42790854e8 h1:l7CnU4IiRB0TTQAWqOSXg9MnB2bxWjx4o/Vw6Yb27eM=
knative.dev/hack v0.0.0-20230628110129-fc42790854e8/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20230628105954-91821ae96399 h1:pGHHUiDqIkoYcz9r28Jr186d4dE3TFDpshaMKf72RK0=
knative.dev/networking v0.0.0-20230628105954-91821ae96399/go.mod h1:/CM22Ocewr85rfI84I+WUMoOVZSczpsif4fScImHdfU=
knative.dev/pkg v0.0.0-20230628105954-6eb4b40a9a30 h1:UUjxZMKgK907IfFY3b7xj9sY53c+feiYvzUwPtajN8I=
knative.dev/pkg v0.0.0-20230628105954-6eb4b40a9a30/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk=
knative.dev/serving v0.37.1-0.20230628110702-2e7d6e4a0233 h1:QGEa8Y321Q/lXi/HJpsDEFNJSoEXaG3CZgsiIkwA7c4=
knative.dev/serving v0.37.1-0.20230628110702-2e7d6e4a0233/go.mod h1:G5sRe4RpjxCaNdRI/EQagvtCioMtjOIdfoboauNMpSk=
pgregory.net/rapid v0.3.3 h1:jCjBsY4ln4Atz78QoBWxUEvAHaFyNDQg9+WU62aCn1U=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
37 changes: 37 additions & 0 deletions vendor/knative.dev/serving/pkg/apis/serving/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,27 @@ const (

// QueueSidecarResourcePercentageAnnotationKey is the percentage of user container resources to be used for queue-proxy
// It has to be in [0.1,100]
// Deprecated: Please consider setting resources explicitly for the QP per service, see `QueueSidecarCPUResourceRequestAnnotationKey` for example.
QueueSidecarResourcePercentageAnnotationKey = "queue.sidecar." + GroupName + "/resource-percentage"

// QueueSidecarCPUResourceRequestAnnotationKey is the explicit value of the cpu request for queue-proxy's request resources
QueueSidecarCPUResourceRequestAnnotationKey = "queue.sidecar." + GroupName + "/cpu-resource-request"

// QueueSidecarCPUResourceLimitAnnotationKey is the explicit value of the cpu limit for queue-proxy's limit resources
QueueSidecarCPUResourceLimitAnnotationKey = "queue.sidecar." + GroupName + "/cpu-resource-limit"

// QueueSidecarMemoryResourceRequestAnnotationKey is the explicit value of the memory request for queue-proxy's request resources
QueueSidecarMemoryResourceRequestAnnotationKey = "queue.sidecar." + GroupName + "/memory-resource-request"

// QueueSidecarMemoryResourceLimitAnnotationKey is the explicit value of the memory limit for queue-proxy's limit resources
QueueSidecarMemoryResourceLimitAnnotationKey = "queue.sidecar." + GroupName + "/memory-resource-limit"

// QueueSidecarEphemeralStorageResourceRequestAnnotationKey is the explicit value of the ephemeral storage request for queue-proxy's request resources
QueueSidecarEphemeralStorageResourceRequestAnnotationKey = "queue.sidecar." + GroupName + "/ephemeral-storage-resource-request"

// QueueSidecarEphemeralStorageResourceLimitAnnotationKey is the explicit value of the ephemeral storage limit for queue-proxy's limit resources
QueueSidecarEphemeralStorageResourceLimitAnnotationKey = "queue.sidecar." + GroupName + "/ephemeral-storage-resource-limit"

// VisibilityClusterLocal is the label value for VisibilityLabelKey
// that will result to the Route/KService getting a cluster local
// domain suffix.
Expand Down Expand Up @@ -162,6 +181,24 @@ var (
QueueSidecarResourcePercentageAnnotationKey,
"queue.sidecar." + GroupName + "/resourcePercentage",
}
QueueSidecarCPUResourceRequestAnnotation = kmap.KeyPriority{
QueueSidecarCPUResourceRequestAnnotationKey,
}
QueueSidecarCPUResourceLimitAnnotation = kmap.KeyPriority{
QueueSidecarCPUResourceLimitAnnotationKey,
}
QueueSidecarMemoryResourceRequestAnnotation = kmap.KeyPriority{
QueueSidecarMemoryResourceRequestAnnotationKey,
}
QueueSidecarMemoryResourceLimitAnnotation = kmap.KeyPriority{
QueueSidecarMemoryResourceLimitAnnotationKey,
}
QueueSidecarEphemeralStorageResourceRequestAnnotation = kmap.KeyPriority{
QueueSidecarEphemeralStorageResourceRequestAnnotationKey,
}
QueueSidecarEphemeralStorageResourceLimitAnnotation = kmap.KeyPriority{
QueueSidecarEphemeralStorageResourceLimitAnnotationKey,
}
ProgressDeadlineAnnotation = kmap.KeyPriority{
ProgressDeadlineAnnotationKey,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import (
"strings"
"time"

"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/api/validation"
"knative.dev/pkg/apis"
"knative.dev/pkg/kmap"
"knative.dev/pkg/kmp"
"knative.dev/serving/pkg/apis/autoscaling"
"knative.dev/serving/pkg/apis/config"
Expand Down Expand Up @@ -68,7 +70,7 @@ func (rts *RevisionTemplateSpec) Validate(ctx context.Context) *apis.FieldError
// If the RevisionTemplateSpec has a name specified, then check that
// it follows the requirements on the name.
errs = errs.Also(validateRevisionName(ctx, rts.Name, rts.GenerateName))
errs = errs.Also(validateQueueSidecarAnnotation(rts.Annotations).ViaField("metadata.annotations"))
errs = errs.Also(validateQueueSidecarResourceAnnotations(rts.Annotations).ViaField("metadata.annotations"))
errs = errs.Also(validateProgressDeadlineAnnotation(rts.Annotations).ViaField("metadata.annotations"))
return errs
}
Expand Down Expand Up @@ -179,23 +181,42 @@ func validateTimeoutSeconds(ctx context.Context, timeoutSeconds int64) *apis.Fie
return nil
}

// validateQueueSidecarAnnotation validates QueueSideCarResourcePercentageAnnotation
func validateQueueSidecarAnnotation(m map[string]string) *apis.FieldError {
// validateQueueSidecarResourceAnnotations validates QueueSideCarResourcePercentageAnnotation and other QP resource related annotations.
func validateQueueSidecarResourceAnnotations(m map[string]string) *apis.FieldError {
if len(m) == 0 {
return nil
}
k, v, ok := serving.QueueSidecarResourcePercentageAnnotation.Get(m)
if !ok {
return nil
}
value, err := strconv.ParseFloat(v, 64)
if err != nil {
return apis.ErrInvalidValue(v, apis.CurrentField).ViaKey(k)

var errs *apis.FieldError
if k, v, ok := serving.QueueSidecarResourcePercentageAnnotation.Get(m); ok {
errs = apis.ErrGeneric("Queue proxy resource percentage annotation is deprecated. Please use the available annotations to explicitly set resource values per service").ViaKey(k).At(apis.WarningLevel)
value, err := strconv.ParseFloat(v, 64)
if err != nil {
errs = errs.Also(apis.ErrInvalidValue(v, apis.CurrentField).ViaKey(k))
} else {
if value < 0.1 || value > 100 {
errs = errs.Also(apis.ErrOutOfBoundsValue(value, 0.1, 100.0, apis.CurrentField).ViaKey(k))
}
}
}
if value < 0.1 || value > 100 {
return apis.ErrOutOfBoundsValue(value, 0.1, 100.0, apis.CurrentField).ViaKey(k)
annoKeys := []kmap.KeyPriority{
serving.QueueSidecarCPUResourceRequestAnnotation,
serving.QueueSidecarCPUResourceLimitAnnotation,
serving.QueueSidecarMemoryResourceRequestAnnotation,
serving.QueueSidecarMemoryResourceLimitAnnotation,
serving.QueueSidecarEphemeralStorageResourceRequestAnnotation,
serving.QueueSidecarEphemeralStorageResourceLimitAnnotation,
}
for _, resAnno := range annoKeys {
k, v, ok := resAnno.Get(m)
if !ok {
continue
}
if _, err := resource.ParseQuantity(v); err != nil {
errs = errs.Also(apis.ErrInvalidValue(v, apis.CurrentField).ViaKey(k))
}
}
return nil
return errs
}

// ValidateProgressDeadlineAnnotation validates the revision progress deadline annotation.
Expand Down
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -594,18 +594,18 @@ k8s.io/utils/lru
k8s.io/utils/net
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/hack v0.0.0-20230615155948-d7586a218601
# knative.dev/hack v0.0.0-20230628110129-fc42790854e8
## explicit; go 1.18
knative.dev/hack
# knative.dev/networking v0.0.0-20230616133350-b9dd5c201e19
# knative.dev/networking v0.0.0-20230628105954-91821ae96399
## explicit; go 1.18
knative.dev/networking/pkg/apis/networking
knative.dev/networking/pkg/apis/networking/v1alpha1
knative.dev/networking/pkg/client/clientset/versioned/scheme
knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1
knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake
knative.dev/networking/pkg/config
# knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0
# knative.dev/pkg v0.0.0-20230628105954-6eb4b40a9a30
## explicit; go 1.18
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand All @@ -622,7 +622,7 @@ knative.dev/pkg/network
knative.dev/pkg/profiling
knative.dev/pkg/ptr
knative.dev/pkg/tracker
# knative.dev/serving v0.37.1-0.20230620145233-e865aa7e4e38
# knative.dev/serving v0.37.1-0.20230628110702-2e7d6e4a0233
## explicit; go 1.18
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
Expand Down

0 comments on commit 31c12be

Please sign in to comment.