Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Noor Malik <nmalik@zalando-70804.corp.ad.zalando.net>
  • Loading branch information
Noor Malik committed Sep 20, 2022
1 parent efa8d4c commit 3fa5750
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kubernetes/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func (a *Adapter) UpdateIngressLoadBalancer(ingress *Ingress, loadBalancerDNSNam
case TypeIngress:
return a.ingressClient.updateIngressLoadBalancer(a.kubeClient, ingress.Namespace, ingress.Name, loadBalancerDNSName)
}
return fmt.Errorf("unknown resourceType '%s', failed to update kubernetes resource", ingress.ResourceType)
return fmt.Errorf("unknown resourceType '%s', failed to update Kubernetes resource", ingress.ResourceType)
}

// GetConfigMap retrieves the ConfigMap with name from namespace.
Expand Down
7 changes: 6 additions & 1 deletion kubernetes/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package kubernetes

import (
"fmt"
"net"
"os"
"time"
Expand Down Expand Up @@ -70,7 +71,11 @@ func InClusterConfig() (*Config, error) {

dir := serviceAccountLocator()
tokenProvider := secrets.NewSecretPaths(time.Minute)
tokenProvider.Add(dir + serviceAccountTokenKey)
err := tokenProvider.Add(dir + serviceAccountTokenKey)

if err != nil {
return nil, fmt.Errorf("error when adding token file to token provider: %v", err)
}

rootCAFile := dir + serviceAccountRootCAKey
if _, err := os.Stat(rootCAFile); os.IsNotExist(err) {
Expand Down

0 comments on commit 3fa5750

Please sign in to comment.