knative / knative/serving

Does not support lifecycle, stopSignal, in pod spec.

Open
#16,463 2 comments 0 reactions 0 assignees View on GitHub
kind/bug triage/accepted
Dominant language
Go
Stars
6.1k
Forks
1.2k
Avg merge
2d 7h
Merged PRs (30d)
2

Description

## What version of Knative?

> 1.21.1

## Expected Behavior
I expect v1.RevisionSpec to embed members of PodSpec, including containers.lifecycle.StopSignal, as mentioned in the documentation https://knative.dev/docs/serving/reference/serving-api/#serving.knative.dev/v1.RevisionSpec. Relevant kubernetes docs (1.33+), https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#lifecycle-v1-core.

## Actual Behavior
Trying to apply a knative service manifest specifying lifecycle within the podspec yields:
```
Error from server (BadRequest): error when creating "knative-test.yml": Service in version "v1" cannot be handled as a Service: strict decoding error: unknown field "spec.template.spec.containers[0].lifecycle"
```

## Steps to Reproduce the Problem
Apply the below manifest.
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: lifecycle-test
spec:
template:
spec:
containers:
- image: gcr.io/knative-samples/helloworld-go
ports:
- containerPort: 8080
env:
- name: TARGET
value: "World"
lifecycle:
stopSignal: SIGTERM
```

Contributor guide

Open the contributing guide

Research direction

Start with the serving.knative.dev/v1 RevisionSpec API and the Kubernetes Lifecycle reference linked in the issue, then reproduce the error with the provided lifecycle-test Service manifest. Trace how the pod spec is represented and validate that lifecycle.stopSignal is accepted without the strict decoding error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.