Skip to content

Commit 138ce8e

Browse files
Merge pull request #227 from trevorbox/fix-panic
Fix panic
2 parents 2c43429 + b0a4739 commit 138ce8e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/v1alpha1/utils/commons.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ func (kc *KubeAuthConfiguration) GetKubeAuthPath() string {
194194
}
195195

196196
func (kc *KubeAuthConfiguration) GetServiceAccountName() string {
197-
return kc.ServiceAccount.Name
197+
if kc.ServiceAccount != nil {
198+
return kc.ServiceAccount.Name
199+
}
200+
return "default"
198201
}
199202

200203
func (kc *KubeAuthConfiguration) getCacheKey(kubeNamespace string) string {

0 commit comments

Comments
 (0)