Skip to content

Commit

Permalink
expose Reason on NNCP and NNCE list (#374)
Browse files Browse the repository at this point in the history
Make it easier for users to detect faulty NNCP and NNCE by exposing
Reason of Available condition in kubectl get list.

Signed-off-by: Petr Horacek <[email protected]>
  • Loading branch information
phoracek authored Jan 31, 2020
1 parent 9e0e923 commit 61317ee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ kind: CustomResourceDefinition
metadata:
name: nodenetworkconfigurationenactments.nmstate.io
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Available")].reason
description: Status
name: Status
type: string
group: nmstate.io
names:
kind: NodeNetworkConfigurationEnactment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ kind: CustomResourceDefinition
metadata:
name: nodenetworkconfigurationpolicies.nmstate.io
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Available")].reason
description: Status
name: Status
type: string
group: nmstate.io
names:
kind: NodeNetworkConfigurationPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type NodeNetworkConfigurationEnactmentList struct {
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=nodenetworkconfigurationenactments,shortName=nnce,scope=Cluster
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Available\")].reason",description="Status"
type NodeNetworkConfigurationEnactment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type NodeNetworkConfigurationPolicyList struct {
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=nodenetworkconfigurationpolicies,shortName=nncp,scope=Cluster
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Available\")].reason",description="Status"
type NodeNetworkConfigurationPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down

0 comments on commit 61317ee

Please sign in to comment.