mirror of
https://github.com/cert-manager/webhook-example.git
synced 2025-07-02 14:55:49 +02:00
25 lines
649 B
Go
25 lines
649 B
Go
package main
|
|
|
|
import (
|
|
"webhook-vkcloud/vkcloud"
|
|
|
|
"os"
|
|
|
|
"github.com/cert-manager/cert-manager/pkg/acme/webhook/cmd"
|
|
"k8s.io/klog/v2"
|
|
)
|
|
|
|
var GroupName = os.Getenv("GROUP_NAME")
|
|
|
|
func main() {
|
|
if GroupName == "" {
|
|
klog.Fatal("GROUP_NAME must be specified")
|
|
}
|
|
|
|
// This will register our custom DNS provider with the webhook serving
|
|
// library, making it available as an API under the provided GroupName.
|
|
// You can register multiple DNS provider implementations with a single
|
|
// webhook, where the Name() method will be used to disambiguate between
|
|
// the different implementations.
|
|
cmd.RunWebhookServer(GroupName, vkcloud.NewSolver())
|
|
}
|