Skip to content

Commit e34c3dc

Browse files
committed
chore: fix commit rebase damage
1 parent 9dbeae0 commit e34c3dc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

cmd/x509-certificate-exporter/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ func main() {
7575
kubeExcludeLabels := stringArrayFlag{}
7676
getopt.FlagLong(&kubeExcludeLabels, "exclude-label", 0, "removes the kube secrets with the given label (or label value if specified) from the watch list (applied after --include-label)")
7777

78-
var PasswordsFile string
79-
getopt.FlagLong(&PasswordsFile, "passwords-file", 0, "path to a yaml file containing a list of passwords to try when opening a p12 file")
78+
var PasswordsFile string
79+
getopt.FlagLong(&PasswordsFile, "passwords-file", 0, "path to a yaml file containing a list of passwords to try when opening a p12 file")
8080

8181
getopt.Parse()
8282

@@ -139,7 +139,7 @@ func main() {
139139
KubeExcludeNamespaces: kubeExcludeNamespaces,
140140
KubeIncludeLabels: kubeIncludeLabels,
141141
KubeExcludeLabels: kubeExcludeLabels,
142-
PasswordsFile: PasswordsFile,
142+
PasswordsFile: PasswordsFile,
143143
}
144144

145145
if getopt.Lookup("expose-labels").Seen() {

internal/exporter.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121

2222
"github.com/bmatcuk/doublestar/v4"
2323
"github.com/prometheus/exporter-toolkit/web"
24+
"gopkg.in/yaml.v2"
2425
"k8s.io/client-go/kubernetes"
25-
"gopkg.in/yaml.v2"
2626
)
2727

2828
// Exporter : Configuration (from command-line)
@@ -52,7 +52,7 @@ type Exporter struct {
5252
isDiscovery bool
5353
secretsCache *cache.Cache
5454
configMapsCache *cache.Cache
55-
p12PasswordsFile string
55+
PasswordsFile string
5656
}
5757

5858
// ListenAndServe : Convenience function to start exporter
@@ -269,7 +269,7 @@ func (exporter *Exporter) collectMatchingPaths(pattern string, format certificat
269269
}
270270
} else {
271271
if strings.HasSuffix(file.Name(), ".crt") ||
272-
strings.HasSuffix(file.Name(), ".pem") ||
272+
strings.HasSuffix(file.Name(), ".pem") ||
273273
strings.HasSuffix(file.Name(), ".cert") {
274274
format = certificateFormatPEM
275275
} else {
@@ -354,13 +354,13 @@ func (exporter *Exporter) obtainP12Passwords(filename string) (string, error) {
354354
if err = yaml.Unmarshal(passwordsFile, &config); err != nil {
355355
return "", err
356356
}
357-
357+
358358
for _, p12 := range config.P12 {
359359
if p12.Name == filename {
360360
return p12.Password, nil
361361
}
362362
}
363-
363+
364364
return "", errors.New("p12 password not found")
365365
}
366366

0 commit comments

Comments
 (0)