Skip to content

Commit 696820a

Browse files
committed
added tests
1 parent aa01231 commit 696820a

File tree

5 files changed

+637
-2
lines changed

5 files changed

+637
-2
lines changed

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
const (
1414
ClusterProviderKubeConfig = "kubeconfig"
1515
ClusterProviderInCluster = "in-cluster"
16-
ClusterProviderDisabled = "disabled"
1716
ClusterProviderAuthHeaders = "auth-headers"
17+
ClusterProviderDisabled = "disabled"
1818
)
1919

2020
// StaticConfig is the configuration for the server.

pkg/kubernetes/auth_headers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (h *K8sAuthHeaders) IsValid() bool {
101101
if h.AuthorizationToken != "" {
102102
return true
103103
}
104-
if h.ClientCertificateData != nil && h.ClientKeyData != nil {
104+
if len(h.ClientCertificateData) > 0 && len(h.ClientKeyData) > 0 {
105105
return true
106106
}
107107
return false

0 commit comments

Comments
 (0)