Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aaa26cf714 | |||
| e64faa0ab1 |
@@ -1,4 +1,4 @@
|
||||
apiVersion: v2
|
||||
description: A Helm chart for cert-manager-webhook-gandi
|
||||
name: cert-manager-webhook-gandi
|
||||
version: v0.4.0
|
||||
version: v0.4.1
|
||||
|
||||
8
main.go
8
main.go
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -223,7 +224,12 @@ func (c *gandiDNSProviderSolver) getApiKey(cfg *gandiDNSProviderConfig, namespac
|
||||
return nil, fmt.Errorf("key %q not found in secret \"%s/%s\"", cfg.APIKeySecretRef.Key,
|
||||
cfg.APIKeySecretRef.LocalObjectReference.Name, namespace)
|
||||
}
|
||||
var decoded []byte
|
||||
_, err = base64.RawStdEncoding.Decode(decoded, secBytes)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to decode api key secret: %w", err)
|
||||
}
|
||||
|
||||
apiKey := string(secBytes)
|
||||
apiKey := string(decoded)
|
||||
return &apiKey, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user