Skip to content
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

Bump knative.dev/serving from 0.38.6 to 0.39.0 #2248

Merged
merged 1 commit into from
Feb 14, 2024
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 @@ -331,7 +331,7 @@ require (
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
knative.dev/eventing v0.30.1-0.20220407170245-58865afba92c // indirect
knative.dev/networking v0.0.0-20231017124814-2a7676e912b7 // indirect
knative.dev/serving v0.38.6 // indirect
knative.dev/serving v0.39.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.12.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2853,8 +2853,8 @@ knative.dev/pkg v0.0.0-20220325200448-1f7514acd0c2/go.mod h1:5xt0nzCwxvQ2N4w71sm
knative.dev/pkg v0.0.0-20231103161548-f5b42e8dea44 h1:2gjHbqg8K9k1KJtLgxsTvzxovXOhozcrk3AzzJmjsA0=
knative.dev/pkg v0.0.0-20231103161548-f5b42e8dea44/go.mod h1:g+UCgSKQ2f15kHYu/V3CPtoKo5F1x/2Y1ot0NSK7gA0=
knative.dev/reconciler-test v0.0.0-20220328072550-7d32310c9b3a/go.mod h1:wlz1lGyn5fjJYL5PTSL/SOI4xgVpU+q6D4eaa19NsDA=
knative.dev/serving v0.38.6 h1:G4N2dYuMggJf4Cc4ycen/dYjEF1IlyX3zoRpkou/7zI=
knative.dev/serving v0.38.6/go.mod h1:5JIK94q75k2Y09CKpFRMe6Rs12bgCGv25wInPor/XCk=
knative.dev/serving v0.39.0 h1:NVt8WthHmFFMWZ3qpBblXt47del8qqrbCegqwGBVSwk=
knative.dev/serving v0.39.0/go.mod h1:0QIp5mvgWa1oUC2MxMf+Q/JWgG8JhAsSdJKc6iTRlvE=
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI=
Expand Down
11 changes: 0 additions & 11 deletions vendor/knative.dev/serving/AUTHORS

This file was deleted.

3 changes: 3 additions & 0 deletions vendor/knative.dev/serving/pkg/apis/config/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func defaultFeaturesConfig() *Features {
PodSpecNodeSelector: Disabled,
PodSpecRuntimeClassName: Disabled,
PodSpecSecurityContext: Disabled,
PodSpecShareProcessNamespace: Disabled,
PodSpecPriorityClassName: Disabled,
PodSpecSchedulerName: Disabled,
ContainerSpecAddCapabilities: Disabled,
Expand Down Expand Up @@ -91,6 +92,7 @@ func NewFeaturesConfigFromMap(data map[string]string) (*Features, error) {
asFlag("kubernetes.podspec-nodeselector", &nc.PodSpecNodeSelector),
asFlag("kubernetes.podspec-runtimeclassname", &nc.PodSpecRuntimeClassName),
asFlag("kubernetes.podspec-securitycontext", &nc.PodSpecSecurityContext),
asFlag("kubernetes.podspec-shareprocessnamespace", &nc.PodSpecShareProcessNamespace),
asFlag("kubernetes.podspec-priorityclassname", &nc.PodSpecPriorityClassName),
asFlag("kubernetes.podspec-schedulername", &nc.PodSpecSchedulerName),
asFlag("kubernetes.containerspec-addcapabilities", &nc.ContainerSpecAddCapabilities),
Expand Down Expand Up @@ -127,6 +129,7 @@ type Features struct {
PodSpecNodeSelector Flag
PodSpecRuntimeClassName Flag
PodSpecSecurityContext Flag
PodSpecShareProcessNamespace Flag
PodSpecPriorityClassName Flag
PodSpecSchedulerName Flag
ContainerSpecAddCapabilities Flag
Expand Down
29 changes: 27 additions & 2 deletions vendor/knative.dev/serving/pkg/apis/serving/fieldmask.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ func PodSpecMask(ctx context.Context, in *corev1.PodSpec) *corev1.PodSpec {
// This is further validated in ValidatePodSecurityContext.
out.SecurityContext = in.SecurityContext
}
if cfg.Features.PodSpecShareProcessNamespace != config.Disabled {
out.ShareProcessNamespace = in.ShareProcessNamespace
}
if cfg.Features.PodSpecPriorityClassName != config.Disabled {
out.PriorityClassName = in.PriorityClassName
}
Expand All @@ -270,7 +273,6 @@ func PodSpecMask(ctx context.Context, in *corev1.PodSpec) *corev1.PodSpec {
out.HostNetwork = false
out.HostPID = false
out.HostIPC = false
out.ShareProcessNamespace = nil
out.Hostname = ""
out.Subdomain = ""
out.Priority = nil
Expand Down Expand Up @@ -374,6 +376,7 @@ func HandlerMask(in *corev1.ProbeHandler) *corev1.ProbeHandler {
out.Exec = in.Exec
out.HTTPGet = in.HTTPGet
out.TCPSocket = in.TCPSocket
out.GRPC = in.GRPC

return out

Expand Down Expand Up @@ -429,6 +432,22 @@ func TCPSocketActionMask(in *corev1.TCPSocketAction) *corev1.TCPSocketAction {
return out
}

// GRPCActionMask performs a _shallow_ copy of the Kubernetes GRPCAction object to a new
// Kubernetes GRPCAction object bringing over only the fields allowed in the Knative API. This
// does not validate the contents or the bounds of the provided fields.
func GRPCActionMask(in *corev1.GRPCAction) *corev1.GRPCAction {
if in == nil {
return nil
}
out := new(corev1.GRPCAction)

// Allowed fields
out.Port = in.Port
out.Service = in.Service

return out
}

// ContainerPortMask performs a _shallow_ copy of the Kubernetes ContainerPort object to a new
// Kubernetes ContainerPort object bringing over only the fields allowed in the Knative API. This
// does not validate the contents or the bounds of the provided fields.
Expand Down Expand Up @@ -708,8 +727,14 @@ func CapabilitiesMask(ctx context.Context, in *corev1.Capabilities) *corev1.Capa
// Allowed fields
out.Drop = in.Drop

if config.FromContextOrDefaults(ctx).Features.ContainerSpecAddCapabilities != config.Disabled {
if config.FromContextOrDefaults(ctx).Features.ContainerSpecAddCapabilities == config.Enabled {
out.Add = in.Add
} else if config.FromContextOrDefaults(ctx).Features.SecurePodDefaults == config.Enabled {
if len(in.Add) == 1 && in.Add[0] == "NET_BIND_SERVICE" {
out.Add = in.Add
} else {
out.Add = nil
}
}

return out
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,13 @@ func validateProbe(p *corev1.Probe, port corev1.ContainerPort) *apis.FieldError
handlers = append(handlers, "exec")
errs = errs.Also(apis.CheckDisallowedFields(*h.Exec, *ExecActionMask(h.Exec))).ViaField("exec")
}
if h.GRPC != nil {
handlers = append(handlers, "gRPC")
errs = errs.Also(apis.CheckDisallowedFields(*h.GRPC, *GRPCActionMask(h.GRPC))).ViaField("grpc")
}

if len(handlers) == 0 {
errs = errs.Also(apis.ErrMissingOneOf("httpGet", "tcpSocket", "exec"))
errs = errs.Also(apis.ErrMissingOneOf("httpGet", "tcpSocket", "exec", "grpc"))
} else if len(handlers) > 1 {
errs = errs.Also(apis.ErrMultipleOneOf(handlers...))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,15 @@ func (*RevisionSpec) applyProbes(container *corev1.Container) {
}
if container.ReadinessProbe.TCPSocket == nil &&
container.ReadinessProbe.HTTPGet == nil &&
container.ReadinessProbe.Exec == nil {
container.ReadinessProbe.Exec == nil &&
container.ReadinessProbe.GRPC == nil {
container.ReadinessProbe.TCPSocket = &corev1.TCPSocketAction{}
}

if container.ReadinessProbe.GRPC != nil && container.ReadinessProbe.GRPC.Service == nil {
container.ReadinessProbe.GRPC.Service = ptr.String("")
}

if container.ReadinessProbe.SuccessThreshold == 0 {
container.ReadinessProbe.SuccessThreshold = 1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ func (r *Revision) GetRoutingStateModified() time.Time {
return parsed
}

// IsReachable returns whether or not the revision can be reached by a route.
func (r *Revision) IsReachable() bool {
return RoutingState(r.Labels[serving.RoutingStateLabelKey]) == RoutingStateActive
}

// GetProtocol returns the app level network protocol.
func (r *Revision) GetProtocol() net.ProtocolType {
ports := r.Spec.GetContainer().Ports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ func (rs *RouteStatus) MarkCertificateReady(name string) {

// MarkCertificateNotReady marks the RouteConditionCertificateProvisioned
// condition to indicate that the Certificate is not ready.
func (rs *RouteStatus) MarkCertificateNotReady(name string) {
func (rs *RouteStatus) MarkCertificateNotReady(c *v1alpha1.Certificate) {
certificateCondition := c.Status.GetCondition("Ready")
routeCondSet.Manage(rs).MarkUnknown(RouteConditionCertificateProvisioned,
"CertificateNotReady",
"Certificate %s is not ready.", name)
"Certificate %s is not ready: %s", c.Name, certificateCondition.GetReason())
}

// MarkCertificateNotOwned changes the RouteConditionCertificateProvisioned
Expand All @@ -190,10 +191,10 @@ func (rs *RouteStatus) MarkCertificateNotOwned(name string) {
}

const (
// AutoTLSNotEnabledMessage is the message which is set on the
// ExternalDomainTLSNotEnabledMessage is the message which is set on the
// RouteConditionCertificateProvisioned condition when it is set to True
// because AutoTLS was not enabled.
AutoTLSNotEnabledMessage = "autoTLS is not enabled"
// because external-domain-tls was not enabled.
ExternalDomainTLSNotEnabledMessage = "external-domain-tls is not enabled"

// TLSNotEnabledForClusterLocalMessage is the message which is set on the
// RouteConditionCertificateProvisioned condition when it is set to True
Expand All @@ -202,7 +203,7 @@ const (
)

// MarkTLSNotEnabled sets RouteConditionCertificateProvisioned to true when
// certificate config such as autoTLS is not enabled or private cluster-local service.
// certificate config such as external-domain-tls is not enabled or private cluster-local service.
func (rs *RouteStatus) MarkTLSNotEnabled(msg string) {
routeCondSet.Manage(rs).MarkTrueWithReason(RouteConditionCertificateProvisioned,
"TLSNotEnabled", msg)
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2630,7 +2630,7 @@ knative.dev/pkg/tracing/propagation
knative.dev/pkg/tracing/propagation/tracecontextb3
knative.dev/pkg/tracker
knative.dev/pkg/webhook/resourcesemantics
# knative.dev/serving v0.38.6
# knative.dev/serving v0.39.0
## explicit; go 1.18
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
Expand Down
Loading