4 Commits

Author SHA1 Message Date
9b1fde11a2 Bump version to v0.4.2
All checks were successful
Release workflow / Check version (push) Successful in 5s
Release workflow / Publish Helm chart (push) Successful in 33s
Release workflow / Publish Docker image (push) Successful in 2m22s
2023-10-17 14:23:37 -04:00
8c1403a87b Add release script 2023-10-17 14:23:37 -04:00
9d4d1a1d03 Add env var for debugging http calls 2023-10-17 13:44:42 -04:00
cdaa33a539 Properly initialize base64 decoding buffer 2023-10-17 13:41:48 -04:00
3 changed files with 40 additions and 3 deletions

View File

@@ -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

View File

@@ -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
View 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"