Skip to content

Commit

Permalink
Change label for vintage/capi detection
Browse files Browse the repository at this point in the history
Signed-off-by: Matias Charriere <[email protected]>
  • Loading branch information
mcharriere committed Jun 27, 2024
1 parent c3eb228 commit 4b8ed8c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Change the label used to detect whether the Cluster is Vintage or CAPI based.

## [0.10.0] - 2024-04-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion controllers/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (r *ClusterReconciler) reconcile(ctx context.Context, cluster *capi.Cluster
if deletionTimeReached(cluster) {
if !r.DryRun {
// if it's a vintage cluster, we just try to remove the Cluster CR
if _, ok := cluster.Labels[vintageReleaseVersion]; ok {
if _, ok := cluster.Labels[clusterOperatorVersion]; ok {
err := deleteVintageCluster(ctx, log, r.Client, cluster)
if err != nil {
return ctrl.Result{}, err
Expand Down
2 changes: 1 addition & 1 deletion controllers/utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
// fluxLabel is the label for checking if the cluster is created via git-ops
fluxLabel = "kustomize.toolkit.fluxcd.io/name"

vintageReleaseVersion = "release.giantswarm.io/version"
clusterOperatorVersion = "cluster-operator.giantswarm.io/version"
)

func requeue() reconcile.Result {
Expand Down

0 comments on commit 4b8ed8c

Please sign in to comment.