Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kn service export doesn't work with traffic splits #1946

Open
dprotaso opened this issue May 16, 2024 · 2 comments
Open

kn service export doesn't work with traffic splits #1946

dprotaso opened this issue May 16, 2024 · 2 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@dprotaso
Copy link
Member

Here's my sample knative service

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  annotations:
    serving.knative.dev/creator: kubernetes-admin
    serving.knative.dev/lastModifier: kubernetes-admin
  creationTimestamp: "2024-05-16T16:54:16Z"
  generation: 1
  name: hello
  namespace: default
  resourceVersion: "1576"
  uid: 3a9c7bf9-1c57-4698-b193-b8d0329b1fc7
spec:
  template:
    metadata:
      annotations:
        client.knative.dev/updateTimestamp: "2024-05-13T22:41:16Z"
        client.knative.dev/user-image: ghcr.io/knative/helloworld-go:latest
      creationTimestamp: null
    spec:
      containerConcurrency: 0
      containers:
      - env:
        - name: TARGET
          value: Earth
        image: ghcr.io/knative/helloworld-go@sha256:f96c789e20bd20354e951161672a1132520df1389f6078d374658354c95d1b7c
        name: user-container
        ports:
        - containerPort: 8080
          protocol: TCP
        readinessProbe:
          successThreshold: 1
          tcpSocket:
            port: 0
        resources: {}
      enableServiceLinks: false
      timeoutSeconds: 300
  traffic:
  - latestRevision: true
    percent: 50
  - latestRevision: false
    percent: 50
    revisionName: hello-00001
status:
  address:
    url: http://hello.default.svc.cluster.local
  conditions:
  - lastTransitionTime: "2024-05-16T16:54:58Z"
    status: "True"
    type: ConfigurationsReady
  - lastTransitionTime: "2024-05-16T16:55:01Z"
    status: "True"
    type: Ready
  - lastTransitionTime: "2024-05-16T16:55:01Z"
    status: "True"
    type: RoutesReady
  latestCreatedRevisionName: hello-00002
  latestReadyRevisionName: hello-00002
  observedGeneration: 1
  traffic:
  - latestRevision: true
    percent: 50
    revisionName: hello-00002
  - latestRevision: false
    percent: 50
    revisionName: hello-00001
  url: http://hello.default.example.com

Exporting with revisions doesnn't include the second revisions

kn service export hello -o yaml --with-revisions
apiVersion: client.knative.dev/v1alpha1
kind: Export
metadata:
  creationTimestamp: null
spec:
  revisions:
  - apiVersion: serving.knative.dev/v1
    kind: Revision
    metadata:
      annotations:
        client.knative.dev/user-image: ghcr.io/knative/helloworld-go:latest
        serving.knative.dev/routes: hello
      creationTimestamp: null
      labels:
        serving.knative.dev/configuration: hello
        serving.knative.dev/configurationGeneration: "1"
        serving.knative.dev/routingState: active
        serving.knative.dev/service: hello
      name: hello-00001
    spec:
      containerConcurrency: 0
      containers:
      - env:
        - name: TARGET
          value: World
        image: ghcr.io/knative/helloworld-go:latest
        name: user-container
        ports:
        - containerPort: 8080
          protocol: TCP
        readinessProbe:
          successThreshold: 1
          tcpSocket:
            port: 0
        resources: {}
      enableServiceLinks: false
      timeoutSeconds: 300
    status: {}
  service:
    apiVersion: serving.knative.dev/v1
    kind: Service
    metadata:
      creationTimestamp: null
      name: hello
    spec:
      template:
        metadata:
          annotations:
            client.knative.dev/user-image: ghcr.io/knative/helloworld-go:latest
          creationTimestamp: null
        spec:
          containerConcurrency: 0
          containers:
          - env:
            - name: TARGET
              value: Earth
            image: ghcr.io/knative/helloworld-go@sha256:f96c789e20bd20354e951161672a1132520df1389f6078d374658354c95d1b7c
            name: user-container
            ports:
            - containerPort: 8080
              protocol: TCP
            readinessProbe:
              successThreshold: 1
              tcpSocket:
                port: 0
            resources: {}
          enableServiceLinks: false
          timeoutSeconds: 300
      traffic:
      - latestRevision: true
        percent: 50
      - latestRevision: false
        percent: 50
        revisionName: hello-00001
    status: {}
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 15, 2024
@dprotaso
Copy link
Member Author

/lifecycle frozen

@knative-prow knative-prow bot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

1 participant