-
Notifications
You must be signed in to change notification settings - Fork 2k
/
main.go
34 lines (27 loc) · 855 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
import (
"flag"
"log"
"github.com/jetstack/cert-manager/pkg/issuer/acme/http/solver"
)
// acmesolver solves ACME http-01 challenges. This is intended to run as a pod
// in the target kubernetes cluster in order to solve challenges for
// cert-manager.
var (
listenPort = flag.Int("listen-port", 8089, "the port number to listen on for connections")
domain = flag.String("domain", "", "the domain name to verify")
token = flag.String("token", "", "the challenge token to verify against")
key = flag.String("key", "", "the challenge key to respond with")
)
func main() {
flag.Parse()
s := &solver.HTTP01Solver{
ListenPort: *listenPort,
Domain: *domain,
Token: *token,
Key: *key,
}
if err := s.Listen(); err != nil {
log.Fatalf("error listening for connections: %s", err.Error())
}
}