Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b1fde11a2 | |||
| 8c1403a87b | |||
| 9d4d1a1d03 | |||
| cdaa33a539 |
@@ -1,4 +1,4 @@
|
||||
apiVersion: v2
|
||||
description: A Helm chart for cert-manager-webhook-gandi
|
||||
name: cert-manager-webhook-gandi
|
||||
version: v0.4.1
|
||||
version: v0.4.2
|
||||
|
||||
8
main.go
8
main.go
@@ -29,7 +29,10 @@ const (
|
||||
GandiMinTtl = 300 // Gandi reports an error for values < this value
|
||||
)
|
||||
|
||||
var GroupName = os.Getenv("GROUP_NAME")
|
||||
var (
|
||||
DebugHTTP = os.Getenv("DEBUG_HTTP")
|
||||
GroupName = os.Getenv("GROUP_NAME")
|
||||
)
|
||||
|
||||
func main() {
|
||||
if GroupName == "" {
|
||||
@@ -205,6 +208,7 @@ func (c *gandiDNSProviderSolver) newClient(ch *v1alpha1.ChallengeRequest) (*live
|
||||
return gandi.NewLiveDNSClient(config.Config{
|
||||
APIKey: *apiKey,
|
||||
Timeout: time.Second * 30,
|
||||
Debug: DebugHTTP != "",
|
||||
}), nil
|
||||
}
|
||||
|
||||
@@ -224,7 +228,7 @@ 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
|
||||
decoded := make([]byte, base64.StdEncoding.DecodedLen(len(secBytes)))
|
||||
_, err = base64.RawStdEncoding.Decode(decoded, secBytes)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to decode api key secret: %w", err)
|
||||
|
||||
33
scripts/release.sh
Executable file
33
scripts/release.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
version="$(yq '.version' ../deploy/cert-manager-webhook-gandi/Chart.yaml)"
|
||||
version="${version#v}"
|
||||
major="$(echo "$version" | cut -d'.' -f1)"
|
||||
minor="$(echo "$version" | cut -d'.' -f2)"
|
||||
patch="$(echo "$version" | cut -d'.' -f3)"
|
||||
case "${1:-""}" in
|
||||
major)
|
||||
major=$((major + 1))
|
||||
minor=0
|
||||
patch=0
|
||||
;;
|
||||
minor)
|
||||
minor=$((minor + 1))
|
||||
patch=0
|
||||
;;
|
||||
patch)
|
||||
patch=$((patch + 1))
|
||||
;;
|
||||
*)
|
||||
echo "Unknown release type"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
version="$major.$minor.$patch"
|
||||
|
||||
yq -i ".version |= \"v$version\"" ../deploy/cert-manager-webhook-gandi/Chart.yaml
|
||||
git add ../deploy/
|
||||
git commit -m "Bump version to v$version"
|
||||
git tag -a "v$version"
|
||||
Reference in New Issue
Block a user