Skip to content

Commit

Permalink
Modify event message
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhesh Ghadi <[email protected]>
  • Loading branch information
svghadi committed Oct 31, 2024
1 parent 9158bd4 commit 9739603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/argocd/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ func (r *ReconcileArgoCD) overrideRouteTLS(tls *routev1.TLSConfig, route *routev

// Send an event when deprecated field key and certificate is used
if tls.Key != "" || tls.Certificate != "" {
// Emit event for each instance providing users with deprecation notice for `.spec.SSO` subfields if not emitted already
// Emit event for each instance providing users with warning message for `.tls.key` & `tls.certificate` subfields if not emitted already
if currentInstanceEventEmissionStatus, ok := DeprecationEventEmissionTracker[cr.Namespace]; !ok || !currentInstanceEventEmissionStatus.TLSInsecureWarningEmitted {
err := argoutil.CreateEvent(r.Client, "Warning", "Insecure field Used", "Warning: .tls.key and .tls.certificate are insecure in ArgoCD CR and not recommended. Use .tls.externalCertificate to reference a TLS secret instead.", "InsecureFields", cr.ObjectMeta, cr.TypeMeta)
err := argoutil.CreateEvent(r.Client, "Warning", "Insecure field Used", ".tls.key and .tls.certificate are insecure in ArgoCD CR and not recommended. Use .tls.externalCertificate to reference a TLS secret instead.", "InsecureFields", cr.ObjectMeta, cr.TypeMeta)
if err != nil {
return err
}
Expand Down

0 comments on commit 9739603

Please sign in to comment.