Skip to content

Commit e88ef6c

Browse files
committed
chore: fix commit rebase damage
1 parent fc469b0 commit e88ef6c

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

@@ -148,7 +148,7 @@ func main() {
148148
KubeExcludeNamespaces: kubeExcludeNamespaces,
149149
KubeIncludeLabels: kubeIncludeLabels,
150150
KubeExcludeLabels: kubeExcludeLabels,
151-
PasswordsFile: PasswordsFile,
151+
PasswordsFile: PasswordsFile,
152152
}
153153

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

internal/exporter.go

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

2323
"github.com/bmatcuk/doublestar/v4"
2424
"github.com/prometheus/exporter-toolkit/web"
25+
"gopkg.in/yaml.v2"
2526
"k8s.io/client-go/kubernetes"
26-
"gopkg.in/yaml.v2"
2727
)
2828

2929
// Exporter : Configuration (from command-line)
@@ -53,7 +53,7 @@ type Exporter struct {
5353
isDiscovery bool
5454
secretsCache *cache.Cache
5555
configMapsCache *cache.Cache
56-
p12PasswordsFile string
56+
PasswordsFile string
5757
}
5858

5959
type KubeSecretType struct {
@@ -297,7 +297,7 @@ func (exporter *Exporter) collectMatchingPaths(pattern string, format certificat
297297
}
298298
} else {
299299
if strings.HasSuffix(file.Name(), ".crt") ||
300-
strings.HasSuffix(file.Name(), ".pem") ||
300+
strings.HasSuffix(file.Name(), ".pem") ||
301301
strings.HasSuffix(file.Name(), ".cert") {
302302
format = certificateFormatPEM
303303
} else {
@@ -382,13 +382,13 @@ func (exporter *Exporter) obtainP12Passwords(filename string) (string, error) {
382382
if err = yaml.Unmarshal(passwordsFile, &config); err != nil {
383383
return "", err
384384
}
385-
385+
386386
for _, p12 := range config.P12 {
387387
if p12.Name == filename {
388388
return p12.Password, nil
389389
}
390390
}
391-
391+
392392
return "", errors.New("p12 password not found")
393393
}
394394

0 commit comments

Comments
 (0)