Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f143a34954 | |||
| 4d78692298 | |||
| dfa2e7f205 | |||
| 89deb39e81 |
@@ -1,4 +1,4 @@
|
||||
apiVersion: v2
|
||||
description: A Helm chart for cert-manager-webhook-gandi
|
||||
name: cert-manager-webhook-gandi
|
||||
version: v0.4.4
|
||||
version: v0.4.6
|
||||
|
||||
7
main.go
7
main.go
@@ -111,10 +111,11 @@ func (c *gandiDNSProviderSolver) Present(ch *v1alpha1.ChallengeRequest) error {
|
||||
return fmt.Errorf("failed to get record: %w", err)
|
||||
}
|
||||
|
||||
txtValues := []string{fmt.Sprintf(`"%s"`, ch.Key)}
|
||||
if present {
|
||||
_, err = client.UpdateDomainRecordByNameAndType(domain, entry, "TXT", GandiMinTtl, []string{ch.Key})
|
||||
_, err = client.UpdateDomainRecordByNameAndType(domain, entry, "TXT", GandiMinTtl, txtValues)
|
||||
} else {
|
||||
_, err = client.CreateDomainRecord(domain, entry, "TXT", GandiMinTtl, []string{ch.Key})
|
||||
_, err = client.CreateDomainRecord(domain, entry, "TXT", GandiMinTtl, txtValues)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to set record: %w", err)
|
||||
@@ -205,7 +206,7 @@ func (c *gandiDNSProviderSolver) newClient(ch *v1alpha1.ChallengeRequest) (*live
|
||||
}
|
||||
|
||||
return gandi.NewLiveDNSClient(config.Config{
|
||||
APIKey: apiKey,
|
||||
Token: apiKey,
|
||||
Timeout: time.Second * 30,
|
||||
Debug: DebugHTTP != "",
|
||||
}), nil
|
||||
|
||||
Reference in New Issue
Block a user