Skip to content

Commit

Permalink
change err name
Browse files Browse the repository at this point in the history
  • Loading branch information
hashiblaum committed Oct 31, 2024
1 parent 8a3d351 commit 0d4a15e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion consts/reasons.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const (
HVSVaultClientConfigError = "HVSClientConfigError"
ReasonVaultClientError = "VaultClientError"
ReasonVaultStaticSecret = "VaultStaticSecretError"
ReasonVaultDynamicSecret = "VaultDynamicSecretError"
ReasonHVSStaticSecret = "HVSStaticSecretError"
ReasonHVSDynamicSecret = "HVSDynamicSecretError"
ReasonSecretDataDrift = "SecretDataDrift"
ReasonInexistentDestination = "InexistentDestination"
ReasonResourceUpdated = "ResourceUpdated"
Expand Down
4 changes: 2 additions & 2 deletions controllers/hcpvaultsecretsapp_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (r *HCPVaultSecretsAppReconciler) Reconcile(ctx context.Context, req ctrl.R
d, err := parseDurationString(o.Spec.RefreshAfter, ".spec.refreshAfter", r.MinRefreshAfter)
if err != nil {
logger.Error(err, "Field validation failed")
r.Recorder.Eventf(o, corev1.EventTypeWarning, consts.ReasonVaultStaticSecret,
r.Recorder.Eventf(o, corev1.EventTypeWarning, consts.ReasonHVSStaticSecret,
"Field validation failed, err=%s", err)
return ctrl.Result{}, err
}
Expand Down Expand Up @@ -189,7 +189,7 @@ func (r *HCPVaultSecretsAppReconciler) Reconcile(ctx context.Context, req ctrl.R
dynamicSecrets, err := getHVSDynamicSecrets(ctx, c, o.Spec.AppName, renewPercent, shadowSecrets)
if err != nil {
logger.Error(err, "Get Dynamic Secrets", "appName", o.Spec.AppName)
r.Recorder.Eventf(o, corev1.EventTypeWarning, consts.ReasonVaultDynamicSecret,
r.Recorder.Eventf(o, corev1.EventTypeWarning, consts.ReasonHVSDynamicSecret,
"Failed to get hvs dynamic secrets: %s", err)
entry, _ := r.BackOffRegistry.Get(req.NamespacedName)
return ctrl.Result{
Expand Down

0 comments on commit 0d4a15e

Please sign in to comment.