From 8100af8be8aa546fda94b113c8e49e4df00ec39d Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com> Date: Wed, 29 Apr 2020 13:36:52 +0200 Subject: [PATCH] show related trigger authentication (#794) Signed-off-by: Zbynek Roubalik --- deploy/crds/keda.sh_scaledjobs_crd.yaml | 3 +++ deploy/crds/keda.sh_scaledobjects_crd.yaml | 3 +++ pkg/apis/keda/v1alpha1/register.go | 2 +- pkg/apis/keda/v1alpha1/scaledjob_types.go | 2 +- pkg/apis/keda/v1alpha1/scaledobject_types.go | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/deploy/crds/keda.sh_scaledjobs_crd.yaml b/deploy/crds/keda.sh_scaledjobs_crd.yaml index 16ae1da4fb0..ed744e9a8ba 100644 --- a/deploy/crds/keda.sh_scaledjobs_crd.yaml +++ b/deploy/crds/keda.sh_scaledjobs_crd.yaml @@ -7,6 +7,9 @@ spec: - JSONPath: .spec.triggers[*].type name: Triggers type: string + - JSONPath: .spec.triggers[*].authenticationRef.name + name: Authentication + type: string - JSONPath: .status.conditions[?(@.type=="Ready")].status name: Ready type: string diff --git a/deploy/crds/keda.sh_scaledobjects_crd.yaml b/deploy/crds/keda.sh_scaledobjects_crd.yaml index da57ef29e69..006b82b8e6b 100644 --- a/deploy/crds/keda.sh_scaledobjects_crd.yaml +++ b/deploy/crds/keda.sh_scaledobjects_crd.yaml @@ -13,6 +13,9 @@ spec: - JSONPath: .spec.triggers[*].type name: Triggers type: string + - JSONPath: .spec.triggers[*].authenticationRef.name + name: Authentication + type: string - JSONPath: .status.conditions[?(@.type=="Ready")].status name: Ready type: string diff --git a/pkg/apis/keda/v1alpha1/register.go b/pkg/apis/keda/v1alpha1/register.go index 9f2d63accea..c24368f23c0 100644 --- a/pkg/apis/keda/v1alpha1/register.go +++ b/pkg/apis/keda/v1alpha1/register.go @@ -32,4 +32,4 @@ func Kind(kind string) schema.GroupKind { // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() -} \ No newline at end of file +} diff --git a/pkg/apis/keda/v1alpha1/scaledjob_types.go b/pkg/apis/keda/v1alpha1/scaledjob_types.go index fb56e76ab87..2c562314115 100644 --- a/pkg/apis/keda/v1alpha1/scaledjob_types.go +++ b/pkg/apis/keda/v1alpha1/scaledjob_types.go @@ -5,7 +5,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) - // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -14,6 +13,7 @@ import ( // +kubebuilder:subresource:status // +kubebuilder:resource:path=scaledjobs,scope=Namespaced,shortName=sj // +kubebuilder:printcolumn:name="Triggers",type="string",JSONPath=".spec.triggers[*].type" +// +kubebuilder:printcolumn:name="Authentication",type="string",JSONPath=".spec.triggers[*].authenticationRef.name" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status" // +kubebuilder:printcolumn:name="Active",type="string",JSONPath=".status.conditions[?(@.type==\"Active\")].status" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/pkg/apis/keda/v1alpha1/scaledobject_types.go b/pkg/apis/keda/v1alpha1/scaledobject_types.go index a046d816c39..07a41bffb2f 100644 --- a/pkg/apis/keda/v1alpha1/scaledobject_types.go +++ b/pkg/apis/keda/v1alpha1/scaledobject_types.go @@ -14,6 +14,7 @@ import ( // +kubebuilder:printcolumn:name="ScaleTargetKind",type="string",JSONPath=".status.scaleTargetKind" // +kubebuilder:printcolumn:name="ScaleTargetName",type="string",JSONPath=".spec.scaleTargetRef.name" // +kubebuilder:printcolumn:name="Triggers",type="string",JSONPath=".spec.triggers[*].type" +// +kubebuilder:printcolumn:name="Authentication",type="string",JSONPath=".spec.triggers[*].authenticationRef.name" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status" // +kubebuilder:printcolumn:name="Active",type="string",JSONPath=".status.conditions[?(@.type==\"Active\")].status" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"