Add more Events to Orders and Challenges
Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
parent
58c0507c10
commit
315a14ff70
@ -15,6 +15,7 @@ go_library(
|
||||
"//pkg/controller:go_default_library",
|
||||
"//pkg/util:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||
|
||||
@ -20,6 +20,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
|
||||
@ -78,11 +79,13 @@ func (c *Controller) Sync(ctx context.Context, ch *cmapi.Challenge) error {
|
||||
// if there are no 'conflicts' detected above, then we can mark this challenge
|
||||
// as processing.
|
||||
ch.Status.Processing = true
|
||||
_, err = c.CMClient.CertmanagerV1alpha1().Challenges(ch.Namespace).Update(ch)
|
||||
ch, err = c.CMClient.CertmanagerV1alpha1().Challenges(ch.Namespace).Update(ch)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c.Recorder.Event(ch, corev1.EventTypeNormal, "Started", "Challenge scheduled for processing")
|
||||
|
||||
// we ignore the return value from waitForCacheSync - if it is false, the
|
||||
// controller will shutdown anyway.
|
||||
_ = c.waitForCacheSync()
|
||||
|
||||
@ -18,6 +18,7 @@ go_library(
|
||||
"//pkg/util:go_default_library",
|
||||
"//third_party/crypto/acme:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
|
||||
@ -21,6 +21,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/selection"
|
||||
@ -186,6 +187,12 @@ func (c *Controller) Sync(ctx context.Context, o *cmapi.Order) (err error) {
|
||||
continue
|
||||
}
|
||||
|
||||
domainName := spec.DNSName
|
||||
if spec.Wildcard {
|
||||
domainName = "*." + domainName
|
||||
}
|
||||
c.Recorder.Eventf(ch, corev1.EventTypeNormal, "Created", "Created Challenge resource %q for domain %q", ch.Name, ch.Spec.DNSName)
|
||||
|
||||
existingChallenges = append(existingChallenges, ch)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user