diff --git a/Makefile b/Makefile index 9d5a10b9..d3a212fd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ #include tests/e2e/Makefile -VERSION ?= 1.3.2 +VERSION ?= 1.3.3 # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") diff --git a/api/v1alpha1/uffizzicluster_types.go b/api/v1alpha1/uffizzicluster_types.go index af586568..45f5a2ca 100644 --- a/api/v1alpha1/uffizzicluster_types.go +++ b/api/v1alpha1/uffizzicluster_types.go @@ -160,7 +160,7 @@ type UffizziClusterStatus struct { Host *string `json:"host,omitempty"` LastAppliedConfiguration *string `json:"lastAppliedConfiguration,omitempty"` LastAppliedHelmReleaseSpec *string `json:"lastAppliedHelmReleaseSpec,omitempty"` - LastAwakeTime *string `json:"lastAwakeTime,omitempty"` + LastAwakeTime metav1.Time `json:"lastAwakeTime,omitempty"` } // VClusterKubeConfig is the KubeConfig SecretReference of the related VCluster diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 8b39fbcc..da3bff52 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -372,11 +372,7 @@ func (in *UffizziClusterStatus) DeepCopyInto(out *UffizziClusterStatus) { *out = new(string) **out = **in } - if in.LastAwakeTime != nil { - in, out := &in.LastAwakeTime, &out.LastAwakeTime - *out = new(string) - **out = **in - } + in.LastAwakeTime.DeepCopyInto(&out.LastAwakeTime) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UffizziClusterStatus. diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 511ffa05..8e5e58b5 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -10,7 +10,7 @@ version: 1.3.1 # 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: "v1.3.2" +appVersion: "v1.3.3" dependencies: - name: common repository: https://charts.bitnami.com/bitnami diff --git a/chart/templates/uffizziclusters.uffizzi.com_customresourcedefinition.yaml b/chart/templates/uffizziclusters.uffizzi.com_customresourcedefinition.yaml index 0e424fae..98ea1a82 100644 --- a/chart/templates/uffizziclusters.uffizzi.com_customresourcedefinition.yaml +++ b/chart/templates/uffizziclusters.uffizzi.com_customresourcedefinition.yaml @@ -265,6 +265,7 @@ spec: lastAppliedHelmReleaseSpec: type: string lastAwakeTime: + format: date-time type: string type: object type: object diff --git a/chart/values.yaml b/chart/values.yaml index 504ef423..7819400a 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -4,7 +4,7 @@ image: repository: docker.io/uffizzi/uffizzi-cluster-operator - tag: v1.3.2 + tag: v1.3.3 # `flux` dependency values flux: helmController: @@ -31,7 +31,6 @@ flux: # controller: # extraArgs: # enable-ssl-passthrough: true - # To install nginx-ingress and cert-manager charts # along with the rest apply the following tags (enabled by default) #tags: diff --git a/config/crd/bases/uffizzi.com_uffizziclusters.yaml b/config/crd/bases/uffizzi.com_uffizziclusters.yaml index 7e637e04..71bdacfa 100644 --- a/config/crd/bases/uffizzi.com_uffizziclusters.yaml +++ b/config/crd/bases/uffizzi.com_uffizziclusters.yaml @@ -303,6 +303,7 @@ spec: lastAppliedHelmReleaseSpec: type: string lastAwakeTime: + format: date-time type: string type: object type: object diff --git a/controllers/uffizzicluster_controller.go b/controllers/uffizzicluster_controller.go index 7431a964..a7b35396 100644 --- a/controllers/uffizzicluster_controller.go +++ b/controllers/uffizzicluster_controller.go @@ -152,14 +152,14 @@ func (r *UffizziClusterReconciler) Reconcile(ctx context.Context, req ctrl.Reque kubeConfig = uclusteruffizzicomv1alpha1.VClusterKubeConfig{ SecretRef: &meta.SecretKeyReference{}, } - lastAwakeTime = metav1.Now().String() + lastAwakeTime = metav1.Now().Rfc3339Copy() ) uCluster.Status = uclusteruffizzicomv1alpha1.UffizziClusterStatus{ Conditions: intialConditions, HelmReleaseRef: &helmReleaseRef, Host: &host, KubeConfig: kubeConfig, - LastAwakeTime: &lastAwakeTime, + LastAwakeTime: lastAwakeTime, } if err := r.Status().Update(ctx, uCluster); err != nil { logger.Error(err, "Failed to update the default UffizziCluster status") @@ -322,8 +322,7 @@ func (r *UffizziClusterReconciler) reconcileSleepState(ctx context.Context, uClu } // set status for vcluster waking up lastAwakeTime := metav1.Now().Rfc3339Copy() - lastAwakeTimeString := lastAwakeTime.String() - uCluster.Status.LastAwakeTime = &lastAwakeTimeString + uCluster.Status.LastAwakeTime = lastAwakeTime setCondition(uCluster, Awoken(lastAwakeTime)) } if err := r.Status().Update(ctx, uCluster); err != nil {