Skip to content

Commit

Permalink
Remove HarborProject LastApplyTime to fix reconciliation
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Löwel <mail@cloewel.de>
  • Loading branch information
ChristianLoewel committed Aug 18, 2023
1 parent 4f460cb commit 4a4acfe
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
3 changes: 0 additions & 3 deletions apis/goharbor.io/v1beta1/harborproject_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ type HarborProjectStatus struct {
// Message provides human-readable message.
// +kubebuilder:validation:Optional
Message string `json:"message,omitempty"`
// LastApplyTime represents the last apply configuration time.
// +kubebuilder:validation:Optional
LastApplyTime *metav1.Time `json:"lastApplyTime,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
6 changes: 1 addition & 5 deletions apis/goharbor.io/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions controllers/goharbor/project/harborproject.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
harborClient "github.com/goharbor/harbor-operator/pkg/rest"
"github.com/pkg/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
Expand Down Expand Up @@ -49,8 +48,6 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.
hp.Status.Status = goharborv1beta1.HarborProjectStatusReady
hp.Status.Reason = ""
hp.Status.Message = ""
now := metav1.Now()
hp.Status.LastApplyTime = &now
}

log.Info("Reconcile end", "result", res, "error", err, "updateStatusError", r.Client.Status().Update(ctx, hp))
Expand Down
5 changes: 0 additions & 5 deletions manifests/cluster/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13528,11 +13528,6 @@ spec:
status:
description: HarborProjectStatus defines the status of HarborProject.
properties:
lastApplyTime:
description: LastApplyTime represents the last apply configuration
time.
format: date-time
type: string
membershipHash:
description: MembershipHash provides a way to quickly notice changes
in project membership.
Expand Down
5 changes: 0 additions & 5 deletions manifests/harbor/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13528,11 +13528,6 @@ spec:
status:
description: HarborProjectStatus defines the status of HarborProject.
properties:
lastApplyTime:
description: LastApplyTime represents the last apply configuration
time.
format: date-time
type: string
membershipHash:
description: MembershipHash provides a way to quickly notice changes
in project membership.
Expand Down

0 comments on commit 4a4acfe

Please sign in to comment.