From 6246acc74c00572581fa54a86ca3e17af0cfaba7 Mon Sep 17 00:00:00 2001 From: exe-r Date: Tue, 4 Jul 2023 22:42:34 +0300 Subject: [PATCH 1/2] Fix typos on README file --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fec9f5f..ce901ec 100644 --- a/README.md +++ b/README.md @@ -95,11 +95,11 @@ A such annotated secret looks like the following: ## Alerting when a certificate is about to expire -This operator can generate Prometheus alerts and/or Kubernetes events when a certifciate is about to expire. +This operator can generate Prometheus alerts and/or Kubernetes events when a certificate is about to expire. ### Generating prometheus alerts -Prometheus alerts are generated for all certificates. In order for the certifciate metrics to be collected and the alerts be generated the Prometheus CRs deployed with this operator must be honored by a [Prometheus operator](https://github.com/prometheus-operator/prometheus-operator). If you are running on OpenShift just add the label ``openshift.io/cluster-monitoring="true"`` to the namespace containing the operator. +Prometheus alerts are generated for all certificates. In order for the certificate metrics to be collected and the alerts be generated the Prometheus CRs deployed with this operator must be honored by a [Prometheus operator](https://github.com/prometheus-operator/prometheus-operator). If you are running on OpenShift just add the label ``openshift.io/cluster-monitoring="true"`` to the namespace containing the operator. The following metrics will be collected for every tls secret: @@ -110,8 +110,8 @@ The following metrics will be collected for every tls secret: | `cert:validity_duration:sec` | duration of the certificate validity in seconds | | `cert:time_to_expiration:sec` | time left to expiration in seconds | -Alerts will be generated at 85% and 95% of the certifciate lifetime. -Alerts are generated for all certificates including certifciate that are possibly automatically rotated. This is intentional as the automation that rotates the certificates may be non-functioning. +Alerts will be generated at 85% and 95% of the certificate lifetime. +Alerts are generated for all certificates including certificate that are possibly automatically rotated. This is intentional as the automation that rotates the certificates may be non-functioning. If these alerts are not useful in your deployment, you can be silenced them in alert-manager as described [here](https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule). From 65410ef4fc2e2e9a166a112a5ebcbec232bccec6 Mon Sep 17 00:00:00 2001 From: exe-r Date: Tue, 4 Jul 2023 22:42:52 +0300 Subject: [PATCH 2/2] Fix typo within code --- controllers/route/route_controller.go | 2 +- controllers/secrettokeystore/secret_to_keystore_controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/route/route_controller.go b/controllers/route/route_controller.go index b6e889a..f12a290 100644 --- a/controllers/route/route_controller.go +++ b/controllers/route/route_controller.go @@ -291,7 +291,7 @@ func (e *enqueueRequestForReferecingRoutes) Generic(evt event.GenericEvent, q wo func populateRouteWithCertifcates(route *routev1.Route, secret *corev1.Secret) bool { shouldUpdate := false if route.Spec.TLS.Termination == "edge" || route.Spec.TLS.Termination == "reencrypt" { - // here we need to replace the terminating certifciate + // here we need to replace the terminating certificate if value, ok := secret.Data[util.Key]; ok && len(value) != 0 { if route.Spec.TLS.Key != string(value) { route.Spec.TLS.Key = string(value) diff --git a/controllers/secrettokeystore/secret_to_keystore_controller.go b/controllers/secrettokeystore/secret_to_keystore_controller.go index 21affe3..374c5af 100644 --- a/controllers/secrettokeystore/secret_to_keystore_controller.go +++ b/controllers/secrettokeystore/secret_to_keystore_controller.go @@ -300,7 +300,7 @@ func (r *SecretToKeyStoreReconciler) getTrustStoreFromSecret(secret *corev1.Secr }, }) if err != nil { - r.Log.Error(err, "unable to set trusted certifciate entry") + r.Log.Error(err, "unable to set trusted certificate entry") return []byte{}, err } // increment counter