diff --git a/Makefile b/Makefile index 3e6934c..cadc8cf 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ OPERATOR_SDK_VERSION ?= v1.38.0 # Image URL to use all building/pushing image targets DOCKER_HUB_NAME ?= $(shell docker info | sed '/Username:/!d;s/.* //') IMG_NAME ?= typesense-operator -IMG_TAG ?= 0.2.4 +IMG_TAG ?= 0.2.5 IMG ?= $(DOCKER_HUB_NAME)/$(IMG_NAME):$(IMG_TAG) # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. diff --git a/charts/typesense-operator/Chart.yaml b/charts/typesense-operator/Chart.yaml index b009f12..c94c7df 100644 --- a/charts/typesense-operator/Chart.yaml +++ b/charts/typesense-operator/Chart.yaml @@ -13,9 +13,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.4 +version: 0.2.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.2.4" +appVersion: "0.2.5" diff --git a/charts/typesense-operator/values.yaml b/charts/typesense-operator/values.yaml index 353e577..d512e94 100644 --- a/charts/typesense-operator/values.yaml +++ b/charts/typesense-operator/values.yaml @@ -12,7 +12,7 @@ controllerManager: - ALL image: repository: akyriako78/typesense-operator - tag: 0.2.4 + tag: 0.2.5 resources: limits: cpu: 500m diff --git a/internal/controller/typesensecluster_controller.go b/internal/controller/typesensecluster_controller.go index 64e072d..22597a0 100644 --- a/internal/controller/typesensecluster_controller.go +++ b/internal/controller/typesensecluster_controller.go @@ -22,6 +22,7 @@ import ( "github.com/pkg/errors" "golang.org/x/text/cases" "golang.org/x/text/language" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" @@ -203,14 +204,16 @@ func (r *TypesenseClusterReconciler) Reconcile(ctx context.Context, req ctrl.Req delayPerReplicaPeriodSeconds = int64(size) } } else { - //c := ts.Status.Conditions[0] + report := ts.Status.Conditions[0].Status != metav1.ConditionTrue cerr := r.setConditionReady(ctx, &ts, string(condition)) if cerr != nil { return ctrl.Result{}, cerr } - r.Recorder.Eventf(&ts, "Normal", string(condition), toTitle("quorum is ready")) + if report { + r.Recorder.Eventf(&ts, "Normal", string(condition), toTitle("quorum is ready")) + } delayPerReplicaPeriodSeconds = int64(1) }