You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No invalid revision name should be accepted in the revision template of a service.
Actual Behavior
When creating a service and then kubctl edit this to change the revision name to something like hello-@latest, then this gets accepted by the admission controller without error. However, no new revision is created and the service's conditions go into an UNKNOWN state.
The configuration's status indicates the proper invalid name error, though. However the wrong name should not be accepted from the very beginning.
Service
apiVersion: serving.knative.dev/v1alpha1kind: Servicemetadata:
annotations:
serving.knative.dev/lastModifier: kube:admincreationTimestamp: "2019-08-08T07:49:29Z"generation: 3name: hellonamespace: defaultresourceVersion: "586434"selfLink: /apis/serving.knative.dev/v1alpha1/namespaces/default/services/hellouid: 0d2fd2be-b9b1-11e9-9d3c-026298ea7cc0spec:
template:
metadata:
creationTimestamp: nullname: hello-@latestspec:
containers:
- image: gcr.io/knative-samples/helloworld-goname: user-containerresources:
limits:
cpu: "1"memory: 200Mrequests:
cpu: 400mmemory: 100MtimeoutSeconds: 300traffic:
- latestRevision: truepercent: 100status:
address:
url: http://hello.default.svc.cluster.localconditions:
- lastTransitionTime: "2019-08-08T07:54:08Z"message: The Configuration is still working to reflect the latest desired specification.reason: OutOfDatestatus: Unknowntype: ConfigurationsReady
- lastTransitionTime: "2019-08-08T07:54:08Z"message: The Configuration is still working to reflect the latest desired specification.reason: OutOfDatestatus: Unknowntype: Ready
- lastTransitionTime: "2019-08-08T07:53:46Z"status: "True"type: RoutesReadylatestCreatedRevisionName: hello-blalatestReadyRevisionName: hello-blaobservedGeneration: 3traffic:
- latestRevision: truepercent: 100revisionName: hello-blaurl: http://hello.default.apps.rhuss-dev.devcluster.openshift.com
Configuration
apiVersion: serving.knative.dev/v1alpha1kind: Configurationmetadata:
annotations:
serving.knative.dev/lastModifier: kube:admincreationTimestamp: "2019-08-08T07:49:56Z"generation: 4labels:
serving.knative.dev/route: helloserving.knative.dev/service: helloname: hellonamespace: defaultownerReferences:
- apiVersion: serving.knative.dev/v1alpha1blockOwnerDeletion: truecontroller: truekind: Servicename: hellouid: 0d2fd2be-b9b1-11e9-9d3c-026298ea7cc0resourceVersion: "586437"selfLink: /apis/serving.knative.dev/v1alpha1/namespaces/default/configurations/hellouid: 1d775341-b9b1-11e9-a59a-0e9f6097f502spec:
template:
metadata:
creationTimestamp: nullname: hello-@latestspec:
containers:
- image: gcr.io/knative-samples/helloworld-goname: user-containerresources:
limits:
cpu: "1"memory: 200Mrequests:
cpu: 400mmemory: 100MtimeoutSeconds: 300status:
conditions:
- lastTransitionTime: "2019-08-08T07:54:08Z"message: 'Revision creation failed with message: Internal error occurred: admission webhook "webhook.serving.knative.dev" denied the request: mutation failed: not a DNS 1035 label: [a DNS-1035 label must consist of lower case alphanumeric characters or ''-'', start with an alphabetic character, and end with an alphanumeric character (e.g. ''my-name'', or ''abc-123'', regex used for validation is ''[a-z]([-a-z0-9]*[a-z0-9])?'')]: metadata.name.'reason: RevisionFailedstatus: "False"type: ReadylatestCreatedRevisionName: hello-blalatestReadyRevisionName: hello-blaobservedGeneration: 3
Steps to Reproduce the Problem
Create a service e.g. with kn service create hello --image gcr.io/knative-samples/helloworld-go
Edit the service (kubectl edit kscv hello) and insert a name: hello-@latest into the revision template's metadata
The text was updated successfully, but these errors were encountered:
In what area(s)?
/area API
What version of Knative?
0.7.1
Expected Behavior
No invalid revision name should be accepted in the revision template of a service.
Actual Behavior
When creating a service and then
kubctl edit
this to change the revision name to something likehello-@latest
, then this gets accepted by the admission controller without error. However, no new revision is created and the service's conditions go into anUNKNOWN
state.The configuration's status indicates the proper invalid name error, though. However the wrong name should not be accepted from the very beginning.
Service
Configuration
Steps to Reproduce the Problem
kn service create hello --image gcr.io/knative-samples/helloworld-go
kubectl edit kscv hello
) and insert aname: hello-@latest
into the revision template's metadataThe text was updated successfully, but these errors were encountered: