Skip to content

Usage of spec.version: latest is not clear #556

@nak3

Description

@nak3

Describe the bug

Expected behavior

  • The goal is that we want to use manifest with serving.knative.dev/release: devel label.

To Reproduce

1. Add nightly manifests into cmd/operator/kodata/knative-serving/latest/

$ cd <OPERATOR_SOURCE_DIRECTORY>
$ mkdir cmd/operator/kodata/knative-serving/latest/

$ wget -O cmd/operator/kodata/knative-serving/latest/crd.yaml  https://storage.googleapis.com/knative-nightly/serving/latest/serving-crds.yaml
$ wget -O cmd/operator/kodata/knative-serving/latest/core.yaml https://storage.googleapis.com/knative-nightly/serving/latest/serving-core.yaml

2. Install operator

$ ko apply -f config

3. Set version to latest

cat <<-EOF | kubectl apply -f -
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
  name: ks
spec:
  version: latest
EOF

4. Operator fails to start

$ kubectl logs knative-operator-7b86d56f8c-9r9mm  -p
 ....
{"severity":"INFO","timestamp":"2021-04-13T07:46:06.779626756Z","logger":"knative-operator","caller":"knativeserving/knativeserving.go:99","message":"Reconciling KnativeServing","knative.dev/pod":"knative-operator-7b86d56f8c-9r9mm","knative.dev/controller":"knative.dev.operator.pkg.reconciler.knativeserving.Reconciler","knative.dev/kind":"operator.knative.dev.KnativeServing","knative.dev/traceid":"5e702b0c-884e-442f-a959-ab8895e20fc3","knative.dev/key":"default/ks","status":{"observedGeneration":2,"conditions":[{"type":"DependenciesInstalled","status":"Unknown","lastTransitionTime":"2021-04-13T04:25:16Z"},{"type":"DeploymentsAvailable","status":"Unknown","lastTransitionTime":"2021-04-13T04:25:16Z"},{"type":"InstallSucceeded","status":"False","lastTransitionTime":"2021-04-13T04:27:10Z","reason":"Error","message":"Install failed with message: The manifests of the target version latest are not available to this release."},{"type":"Ready","status":"False","lastTransitionTime":"2021-04-13T04:27:10Z","reason":"Error","message":"Install failed with message: The manifests of the target version latest are not available to this release."},{"type":"VersionMigrationEligible","status":"True","lastTransitionTime":"2021-04-13T04:25:16Z"}]}}
panic: runtime error: slice bounds out of range [1:0]
$ kubectl describe knativeserving 
  ...
    Last Transition Time:  2021-04-13T04:27:10Z
    Message:               Install failed with message: The manifests of the target version latest are not available to this release.

Knative release version

HEAD (a2913e3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions