Knative Revisions

171 views
Skip to first unread message

Ciaran Roche

unread,
Mar 27, 2019, 7:46:17 AM3/27/19
to Knative Users
Hey, 

I was hoping someone can point me in the right direction, I am looking at rolling out updates and directing a percentage of traffic to different revisions. Now the problem I am getting is, my revisions all get a random string appended to them. Is there a way I can increment this identifier to something like `00001 -> 00002` over the current revisions being like `fz5qv -> rqxlg`. 

I have tried adding a revision name to `pinned` in this example gist [1]

To help add context, this is an example of the end result which I am looking for [2]

Any help is greatly appreciated.

Cheers
Ciaran

Matthew Moore

unread,
Mar 27, 2019, 8:50:20 AM3/27/19
to Ciaran Roche, Knative Users
Right now we're relying on the Kubernetes generateName facility to produce new Revision names, thus the random string.

Even the "generation"-based naming we had previously (does what you want) was flawed for a variety of scenarios (e.g. GitOps).


However, one recommendation that we're considering as part of the "task force" iterating on a v1beta1 API proposal is to allow users to "bring your own revision name".

NOTE: we do not support this today, it is just a direction we're considering, we're also considering a number of other shape changes not shown.

In your case that would look like this (I also switched your to "release" mode, which replaces "pinned"):
kind: Service
metadata:
  name: r3x-hello-knative
  namespace: default
spec:
  release:
    revisions: [my-next-revision]   # Reference the next Revision
    configuration:
      revisionTemplate:
        metadata:
          name: my-next-revision  # What to name the next Revision (must change whenever revisionTemplate changes)
          annotations:
            autoscaling.knative.dev/metric: concurrency
            autoscaling.knative.dev/target: "60"
        spec:
          container:
            image: docker.io/xxxxx/r3x-hello-knative
            env:
            - name: TARGET
              value: "RubiX Sample v9"


Would that solve your problem?







--
You received this message because you are subscribed to the Google Groups "Knative Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knative-user...@googlegroups.com.
To post to this group, send email to knativ...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knative-users/bf291d55-1e8d-4832-9577-eba88ac1e6fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matthew Moore
Knative @ Google

Ciaran Roche

unread,
Mar 27, 2019, 10:05:33 AM3/27/19
to Knative Users
Hi Matthew, 

Yes that solves my problem alright. 

I appreciate the quick reply, as it is for a college project, so it saves me from playing around with something that is currently not supported. I can manually get back the generatedNames from Kubernetes for my revisions, so that I can at least demonstrate how Knative can direct traffic of deployments.

Cheers
Ciaran

Matthew Moore

unread,
Mar 27, 2019, 10:14:13 AM3/27/19
to Ciaran Roche, Knative Users
Cool, if you run into any trouble give a shout.  We're pretty active on slack too.
-M


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages