From 4737cf1aca1b957585bd14bb76956b5e77960aa8 Mon Sep 17 00:00:00 2001 From: Rokibul Hasan Date: Wed, 25 Sep 2024 07:07:46 +0600 Subject: [PATCH] fix: handle nil value for repositories in pathTemplate (#484) Signed-off-by: Rokibul Hasan --- .../storage.kubestash.com/v1alpha1/backupstorages.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hub/resourcetabledefinitions/storage.kubestash.com/v1alpha1/backupstorages.yaml b/hub/resourcetabledefinitions/storage.kubestash.com/v1alpha1/backupstorages.yaml index fe8ecec34..19b735439 100644 --- a/hub/resourcetabledefinitions/storage.kubestash.com/v1alpha1/backupstorages.yaml +++ b/hub/resourcetabledefinitions/storage.kubestash.com/v1alpha1/backupstorages.yaml @@ -36,7 +36,7 @@ spec: priority: 3 type: string - name: No. of Connected Repositories - pathTemplate: '{{ len .status.repositories }}' + pathTemplate: '{{ if .status.repositories }}{{ len .status.repositories }}{{ else }}0{{ end }}' priority: 3 type: string - color: @@ -50,7 +50,7 @@ spec: {{ end }} {{- printf "%s" $color -}} name: Status - pathTemplate: '{{ .status.phase}}' + pathTemplate: '{{ .status.phase }}' priority: 3 type: string - name: Age