Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Print additional columns for Release objects #80

Merged
merged 1 commit into from Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions crd/Release-crd.yaml
Expand Up @@ -4,6 +4,17 @@ metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: releases.shipper.booking.com
spec:
# additional columns to print for kubectl get command besides NAME and AGE
# and NAMESPACE (in case of passing --all-namespaces flag)
additionalPrinterColumns:
- JSONPath: .metadata.annotations.shipper\.booking\.com\/release\.clusters
description: The list of clusters where a release is supposed to be rolled out as per strategy.
name: Clusters
type: string
- JSONPath: .status.achievedStep.name
description: The current achieved step for a release as defined in the rollout strategy.
name: Step
type: string
# group name to use for REST API: /apis/<group>/<version>
group: shipper.booking.com
# version name to use for REST API: /apis/<group>/<version>
Expand Down
14 changes: 14 additions & 0 deletions pkg/crds/release.go
Expand Up @@ -45,5 +45,19 @@ var Release = &apiextensionv1beta1.CustomResourceDefinition{
},
},
},
AdditionalPrinterColumns: []apiextensionv1beta1.CustomResourceColumnDefinition{
apiextensionv1beta1.CustomResourceColumnDefinition{
Name: "Clusters",
Type: "string",
Description: "The list of clusters where a release is supposed to be rolled out as per strategy.",
JSONPath: ".metadata.annotations.shipper\\.booking\\.com\\/release\\.clusters",
},
apiextensionv1beta1.CustomResourceColumnDefinition{
Name: "Step",
Type: "string",
Description: "The current achieved step for a release as defined in the rollout strategy.",
JSONPath: ".status.achievedStep.name",
},
},
},
}