Skip to content
Permalink
Browse files

Revert "Replaced addressing of the last element in Application.additi…

…onalPrinterColumns from -1 to @length-1"

This reverts commit 2d57473.
client-go’s jsonpath doesn’t support @.properties and negative indexes
are fully supported. We tried this after we discovered that
a941d3a actually makes `kubectl get
app` cause a panic in the apiserver for k8s 1.13.

So we're going back to `[-1]` index, and we're aware that we'll not be
compatible with k8s 1.13 by default. If you need such compatibility, you
can remove additionalPrinterColumns from the Application crd manually
after running `shipperctl`.  Shipper will continue to work perfectly
fine without it ^_^
  • Loading branch information...
juliogreff authored and parhamdoustdar committed Sep 18, 2019
1 parent d946c47 commit b58bb81d00b32247673e34af23654f6e5bf4f73f
Showing with 2 additions and 2 deletions.
  1. +1 −1 crd/Application-crd.yaml
  2. +1 −1 pkg/crds/application.go
@@ -5,7 +5,7 @@ metadata:
name: applications.shipper.booking.com
spec:
additionalPrinterColumns:
- JSONPath: .status.history[(@.length-1)]
- JSONPath: .status.history[-1]
description: The application's latest release.
name: Latest release
type: string
@@ -45,7 +45,7 @@ var Application = &apiextensionv1beta1.CustomResourceDefinition{
Name: "Latest Release",
Type: "string",
Description: "The application's latest release.",
JSONPath: ".status.history[(@.length-1)]",
JSONPath: ".status.history[-1]",
},
apiextensionv1beta1.CustomResourceColumnDefinition{
Name: "Rolling Out",

0 comments on commit b58bb81

Please sign in to comment.
You can’t perform that action at this time.