Skip to content

feat(certificatee): switch to dataplaneapi v3 metadata#28

Merged
ananthb merged 1 commit into
masterfrom
feat/certificatee-dataplaneapi-v3
May 20, 2026
Merged

feat(certificatee): switch to dataplaneapi v3 metadata#28
ananthb merged 1 commit into
masterfrom
feat/certificatee-dataplaneapi-v3

Conversation

@ananthb
Copy link
Copy Markdown
Member

@ananthb ananthb commented May 20, 2026

Summary

  • switch certificatee to HAProxy Data Plane API v3 only
  • use DPAPI certificate metadata for expiry and serial checks instead of TLS probing
  • publish per-certificate not_after timestamps from DPAPI metadata

Details

  • move certificate list/detail/write paths to /v3/services/haproxy/storage/ssl_certificates
  • fetch /v3/services/haproxy/configuration/version and pass version on write operations
  • replace the TLS endpoint serial mismatch path with Data Plane API metadata lookups
  • update tests and README to match the v3-only behavior

Verification

  • go test -v ./pkg/haproxy
  • go test -v ./cmd/certificatee

@ananthb ananthb merged commit 5239919 into master May 20, 2026
1 check passed
@ananthb ananthb deleted the feat/certificatee-dataplaneapi-v3 branch May 20, 2026 08:16
@github-actions
Copy link
Copy Markdown

Code Coverage Report

Total Coverage: total: (statements) 27.7%

Coverage by function
github.com/vinted/certificator/cmd/certificatee/helpers.go:9:		createHAProxyClients	0.0%
github.com/vinted/certificator/cmd/certificatee/main.go:22:		main			0.0%
github.com/vinted/certificator/cmd/certificatee/main.go:73:		maybeUpdateCertificates	0.0%
github.com/vinted/certificator/cmd/certificatee/main.go:89:		processHAProxyEndpoint	0.0%
github.com/vinted/certificator/cmd/certificatee/main.go:173:		shouldUpdateCertificate	0.0%
github.com/vinted/certificator/cmd/certificatee/main.go:211:		updateCertificate	0.0%
github.com/vinted/certificator/cmd/certificatee/main.go:233:		buildPEMBundle		0.0%
github.com/vinted/certificator/cmd/certificatee/main.go:259:		endsWith		0.0%
github.com/vinted/certificator/cmd/certificator/main.go:20:		main			0.0%
github.com/vinted/certificator/pkg/acme/acme.go:27:			GetEmail		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:32:			GetRegistration		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:37:			GetPrivateKey		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:42:			NewClient		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:61:			setupClient		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:80:			setupAccount		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:118:			newAccount		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:130:			getAccountKey		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:159:			registerAccount		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:177:			recoverAccount		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:211:			saveAccount		0.0%
github.com/vinted/certificator/pkg/acme/acme.go:221:			saveKey			0.0%
github.com/vinted/certificator/pkg/certificate/certificate.go:18:	ObtainCertificate	0.0%
github.com/vinted/certificator/pkg/certificate/certificate.go:50:	GetCertificate		0.0%
github.com/vinted/certificator/pkg/certificate/certificate.go:68:	NeedsReissuing		0.0%
github.com/vinted/certificator/pkg/certificate/certificate.go:96:	arraysEqual		0.0%
github.com/vinted/certificator/pkg/certificate/certificate.go:110:	arrayContains		0.0%
github.com/vinted/certificator/pkg/certificate/certificate.go:119:	VaultCertLocation	0.0%
github.com/vinted/certificator/pkg/certificate/certificate.go:123:	storeCertificateInVault	0.0%
github.com/vinted/certificator/pkg/certmetrics/metrics.go:73:		StartMetricsServer	0.0%
github.com/vinted/certificator/pkg/certmetrics/metrics.go:93:		PushMetrics		0.0%
github.com/vinted/certificator/pkg/config/config.go:73:			LoadConfig		0.0%
github.com/vinted/certificator/pkg/haproxy/client.go:50:		NewClient		100.0%
github.com/vinted/certificator/pkg/haproxy/client.go:85:		NewClients		92.3%
github.com/vinted/certificator/pkg/haproxy/client.go:110:		Endpoint		100.0%
github.com/vinted/certificator/pkg/haproxy/client.go:115:		doRequest		88.9%
github.com/vinted/certificator/pkg/haproxy/client.go:133:		parseAPITime		66.7%
github.com/vinted/certificator/pkg/haproxy/client.go:146:		getConfigVersion	66.7%
github.com/vinted/certificator/pkg/haproxy/client.go:211:		ListCertificates	100.0%
github.com/vinted/certificator/pkg/haproxy/client.go:225:		ListCertificateRefs	85.7%
github.com/vinted/certificator/pkg/haproxy/client.go:264:		GetCertificateDetail	68.4%
github.com/vinted/certificator/pkg/haproxy/client.go:305:		UpdateCertificate	85.7%
github.com/vinted/certificator/pkg/haproxy/client.go:329:		CreateCertificate	78.3%
github.com/vinted/certificator/pkg/haproxy/client.go:370:		DeleteCertificate	92.9%
github.com/vinted/certificator/pkg/haproxy/client.go:394:		ExtractDomainFromPath	100.0%
github.com/vinted/certificator/pkg/haproxy/client.go:414:		NormalizeDomainForVault	0.0%
github.com/vinted/certificator/pkg/haproxy/client.go:422:		IsExpiring		100.0%
github.com/vinted/certificator/pkg/haproxy/client.go:433:		NormalizeSerial		100.0%
github.com/vinted/certificator/pkg/haproxy/client.go:456:		Error			100.0%
github.com/vinted/certificator/pkg/haproxy/client.go:460:		Info			0.0%
github.com/vinted/certificator/pkg/haproxy/client.go:464:		Debug			100.0%
github.com/vinted/certificator/pkg/haproxy/client.go:468:		Warn			0.0%
github.com/vinted/certificator/pkg/haproxy/client.go:473:		toLogrusFields		85.7%
github.com/vinted/certificator/pkg/vault/vault.go:18:			NewVaultClient		0.0%
github.com/vinted/certificator/pkg/vault/vault.go:27:			KVWrite			0.0%
github.com/vinted/certificator/pkg/vault/vault.go:41:			KVRead			0.0%
github.com/vinted/certificator/pkg/vault/vault.go:62:			vaultFullPath		0.0%
total:									(statements)		27.7%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant