Skip to content
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
4 changes: 0 additions & 4 deletions config/core/300-resources/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,6 @@ spec:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
maxDurationSeconds:
description: MaxDurationSeconds is the maximum duration in seconds a request will be allowed to stay open.
type: integer
format: int64
serviceAccountName:
description: 'ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/'
type: string
Expand Down
4 changes: 0 additions & 4 deletions config/core/300-resources/revision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,6 @@ spec:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
maxDurationSeconds:
description: MaxDurationSeconds is the maximum duration in seconds a request will be allowed to stay open.
type: integer
format: int64
serviceAccountName:
description: 'ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/'
type: string
Expand Down
4 changes: 0 additions & 4 deletions config/core/300-resources/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,6 @@ spec:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
maxDurationSeconds:
description: MaxDurationSeconds is the maximum duration in seconds a request will be allowed to stay open.
type: integer
format: int64
serviceAccountName:
description: 'ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/'
type: string
Expand Down
39 changes: 0 additions & 39 deletions docs/serving-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -920,19 +920,6 @@ layer will wait for a request delivered to a container to begin replying
(send network traffic). If unspecified, a system default will be provided.</p>
</td>
</tr>
<tr>
<td>
<code>maxDurationSeconds</code><br/>
<em>
int64
</em>
</td>
<td>
<em>(Optional)</em>
<p>MaxDurationSeconds is the maximum duration in seconds a request will be allowed
to stay open.</p>
</td>
</tr>
</table>
</td>
</tr>
Expand Down Expand Up @@ -1395,19 +1382,6 @@ layer will wait for a request delivered to a container to begin replying
(send network traffic). If unspecified, a system default will be provided.</p>
</td>
</tr>
<tr>
<td>
<code>maxDurationSeconds</code><br/>
<em>
int64
</em>
</td>
<td>
<em>(Optional)</em>
<p>MaxDurationSeconds is the maximum duration in seconds a request will be allowed
to stay open.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="serving.knative.dev/v1.RevisionStatus">RevisionStatus
Expand Down Expand Up @@ -1608,19 +1582,6 @@ layer will wait for a request delivered to a container to begin replying
(send network traffic). If unspecified, a system default will be provided.</p>
</td>
</tr>
<tr>
<td>
<code>maxDurationSeconds</code><br/>
<em>
int64
</em>
</td>
<td>
<em>(Optional)</em>
<p>MaxDurationSeconds is the maximum duration in seconds a request will be allowed
to stay open.</p>
</td>
</tr>
</table>
</td>
</tr>
Expand Down
5 changes: 0 additions & 5 deletions pkg/apis/serving/v1/revision_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ type RevisionSpec struct {
// (send network traffic). If unspecified, a system default will be provided.
// +optional
TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"`

// MaxDurationSeconds is the maximum duration in seconds a request will be allowed
// to stay open.
// +optional
MaxDurationSeconds *int64 `json:"maxDurationSeconds,omitempty"`
}

const (
Expand Down
5 changes: 0 additions & 5 deletions pkg/apis/serving/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions pkg/reconciler/revision/resources/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ var (
}, {
Name: "REVISION_TIMEOUT_SECONDS",
Value: "45",
}, {
Name: "MAX_DURATION_SECONDS",
Value: "100",
}, {
Name: "SERVING_POD",
ValueFrom: &corev1.EnvVarSource{
Expand Down Expand Up @@ -266,8 +263,7 @@ func defaultRevision() *v1.Revision {
UID: "1234",
},
Spec: v1.RevisionSpec{
TimeoutSeconds: ptr.Int64(45),
MaxDurationSeconds: ptr.Int64(100),
TimeoutSeconds: ptr.Int64(45),
},
}
}
Expand Down Expand Up @@ -419,8 +415,7 @@ func withContainers(containers []corev1.Container) RevisionOption {
PodSpec: corev1.PodSpec{
Containers: containers,
},
TimeoutSeconds: ptr.Int64(45),
MaxDurationSeconds: ptr.Int64(100),
TimeoutSeconds: ptr.Int64(45),
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions pkg/reconciler/revision/resources/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ func makeQueueContainer(rev *v1.Revision, cfg *config.Config) (*corev1.Container
if rev.Spec.TimeoutSeconds != nil {
ts = *rev.Spec.TimeoutSeconds
}
maxDurationTS := int64(0)
if rev.Spec.MaxDurationSeconds != nil {
maxDurationTS = *rev.Spec.MaxDurationSeconds
}
ports := queueNonServingPorts
if cfg.Observability.EnableProfiling {
ports = append(ports, profilingPort)
Expand Down Expand Up @@ -271,9 +267,6 @@ func makeQueueContainer(rev *v1.Revision, cfg *config.Config) (*corev1.Container
}, {
Name: "REVISION_TIMEOUT_SECONDS",
Value: strconv.Itoa(int(ts)),
}, {
Name: "MAX_DURATION_SECONDS",
Value: strconv.Itoa(int(maxDurationTS)),
}, {
Name: "SERVING_POD",
ValueFrom: &corev1.EnvVarSource{
Expand Down
23 changes: 3 additions & 20 deletions pkg/reconciler/revision/resources/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,6 @@ func TestMakeQueueContainer(t *testing.T) {
"REVISION_TIMEOUT_SECONDS": "99",
})
}),
}, {
name: "custom maxDurationSeconds",
rev: revision("bar", "foo",
withContainers(containers),
func(revision *v1.Revision) {
revision.Spec.MaxDurationSeconds = ptr.Int64(99)
},
),
want: queueContainer(func(c *corev1.Container) {
c.Env = env(map[string]string{
"MAX_DURATION_SECONDS": "99",
})
}),
}, {
name: "default resource config",
rev: revision("bar", "foo",
Expand Down Expand Up @@ -692,8 +679,7 @@ func TestTCPProbeGeneration(t *testing.T) {
SuccessThreshold: 3,
},
rev: v1.RevisionSpec{
TimeoutSeconds: ptr.Int64(45),
MaxDurationSeconds: ptr.Int64(100),
TimeoutSeconds: ptr.Int64(45),
PodSpec: corev1.PodSpec{
Containers: []corev1.Container{{
Name: servingContainerName,
Expand Down Expand Up @@ -733,8 +719,7 @@ func TestTCPProbeGeneration(t *testing.T) {
}, {
name: "tcp defaults",
rev: v1.RevisionSpec{
TimeoutSeconds: ptr.Int64(45),
MaxDurationSeconds: ptr.Int64(100),
TimeoutSeconds: ptr.Int64(45),
PodSpec: corev1.PodSpec{
Containers: []corev1.Container{{
Name: servingContainerName,
Expand Down Expand Up @@ -790,8 +775,7 @@ func TestTCPProbeGeneration(t *testing.T) {
InitialDelaySeconds: 3,
},
rev: v1.RevisionSpec{
TimeoutSeconds: ptr.Int64(45),
MaxDurationSeconds: ptr.Int64(100),
TimeoutSeconds: ptr.Int64(45),
PodSpec: corev1.PodSpec{
Containers: []corev1.Container{{
Name: servingContainerName,
Expand Down Expand Up @@ -872,7 +856,6 @@ var defaultEnv = map[string]string{
"METRICS_COLLECTOR_ADDRESS": "",
"QUEUE_SERVING_PORT": "8012",
"REVISION_TIMEOUT_SECONDS": "45",
"MAX_DURATION_SECONDS": "100",
"SERVING_CONFIGURATION": "",
"SERVING_ENABLE_PROBE_REQUEST_LOG": "false",
"SERVING_ENABLE_REQUEST_LOG": "false",
Expand Down
7 changes: 0 additions & 7 deletions pkg/testing/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,6 @@ func WithRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ServiceOption {
}
}

// WithMaxDurationSeconds sets revision max duration timeout
func WithMaxDurationSeconds(maxDurationSeconds int64) ServiceOption {
return func(service *v1.Service) {
service.Spec.Template.Spec.MaxDurationSeconds = ptr.Int64(maxDurationSeconds)
}
}

// WithServiceAccountName sets revision service account name
func WithServiceAccountName(serviceAccountName string) ServiceOption {
return func(service *v1.Service) {
Expand Down
Loading