Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update patch and CHECKSUMS for CAPC v0.5.0 #3741

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
8c83c64aa2c2a2cfc5205ea1834f71ed2befd2e184d9a9a1ad27b71d8311038b _output/bin/cluster-api-provider-cloudstack/linux-amd64/manager
4508f64a1b01b4b9397791b2dfe8db20cf0fc601ff0f191d23fc5d87cb75cd75 _output/bin/cluster-api-provider-cloudstack/linux-arm64/manager
b845065c9fde77c5a1c0330bbd0d64524e6f5621c2579314709b4baf63bd70f4 _output/bin/cluster-api-provider-cloudstack/linux-amd64/manager
c5f2c85da4b5083d30b0468cfea289f30b9dbe6a6a55af8e5725b8860838bfdb _output/bin/cluster-api-provider-cloudstack/linux-arm64/manager
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 56adab19686da6cb98b61d3286531d4e0b49bb7d Mon Sep 17 00:00:00 2001
From b955446b9e03c0958c6e1e8a54e5021437689e66 Mon Sep 17 00:00:00 2001
From: Jhaanvi Golani <[email protected]>
Date: Mon, 11 Mar 2024 17:32:24 -0700
Subject: [PATCH] Support re-assignment of another failure domain when the
Expand All @@ -18,6 +18,7 @@ Signed-off-by: Jhaanvi Golani <[email protected]>
...loudstackmachinestatechecker_controller.go | 2 +-
controllers/controllers_suite_test.go | 18 +-
controllers/utils/failuredomains.go | 44 +--
metadata.yaml | 2 +-
pkg/cloud/instance.go | 76 +++--
pkg/cloud/network.go | 24 ++
pkg/errors/cloudstack.go | 85 +++++
Expand All @@ -29,7 +30,7 @@ Signed-off-by: Jhaanvi Golani <[email protected]>
pkg/failuredomains/client_test.go | 159 +++++++++
.../failuredomains_suite_test.go | 33 ++
pkg/metrics/metrics.go | 22 +-
23 files changed, 1244 insertions(+), 109 deletions(-)
24 files changed, 1245 insertions(+), 110 deletions(-)
create mode 100644 pkg/errors/cloudstack.go
create mode 100644 pkg/errors/cloudstack_test.go
create mode 100644 pkg/errors/errors_suite_test.go
Expand Down Expand Up @@ -108,15 +109,15 @@ index 83ecdc6..187e51c 100644
- apiGroups:
- cluster.x-k8s.io
diff --git a/controllers/cks_cluster_controller.go b/controllers/cks_cluster_controller.go
index 2511651..b69a748 100644
index 2511651..05d22ab 100644
--- a/controllers/cks_cluster_controller.go
+++ b/controllers/cks_cluster_controller.go
@@ -75,7 +75,7 @@ func (r *CksClusterReconciliationRunner) Reconcile() (res ctrl.Result, reterr er
// Prevent premature deletion.
controllerutil.AddFinalizer(r.ReconciliationSubject, CksClusterFinalizer)

- res, err := r.AsFailureDomainUser(&r.FailureDomains.Items[0].Spec)()
+ res, err := r.AsFailureDomainUser(context.Background(), &r.FailureDomains.Items[0].Spec)()
+ res, err := r.AsFailureDomainUser(r.RequestCtx, &r.FailureDomains.Items[0].Spec)()
if r.ShouldReturn(res, err) {
return res, err
}
Expand All @@ -125,20 +126,20 @@ index 2511651..b69a748 100644
return ctrl.Result{}, fmt.Errorf("no failure domains found")
}
- res, err := r.AsFailureDomainUser(&r.FailureDomains.Items[0].Spec)()
+ res, err := r.AsFailureDomainUser(context.Background(), &r.FailureDomains.Items[0].Spec)()
+ res, err := r.AsFailureDomainUser(r.RequestCtx, &r.FailureDomains.Items[0].Spec)()
if r.ShouldReturn(res, err) {
return res, err
}
diff --git a/controllers/cks_machine_controller.go b/controllers/cks_machine_controller.go
index 574f932..f7f40d4 100644
index 574f932..f8a8119 100644
--- a/controllers/cks_machine_controller.go
+++ b/controllers/cks_machine_controller.go
@@ -63,7 +63,7 @@ func (reconciler *CksMachineReconciler) Reconcile(ctx context.Context, req ctrl.
r.UsingBaseReconciler(reconciler.ReconcilerBase).ForRequest(req).WithRequestCtx(ctx)
r.WithAdditionalCommonStages(
r.GetFailureDomainByName(func() string { return r.ReconciliationSubject.Spec.FailureDomainName }, r.FailureDomain),
- r.AsFailureDomainUser(&r.FailureDomain.Spec))
+ r.AsFailureDomainUser(ctx, &r.FailureDomain.Spec))
+ r.AsFailureDomainUser(r.RequestCtx, &r.FailureDomain.Spec))
return r.RunBaseReconciliationStages()
}

Expand All @@ -147,7 +148,7 @@ index 574f932..f7f40d4 100644
controllerutil.AddFinalizer(r.ReconciliationSubject, CksMachineFinalizer)

- res, err := r.AsFailureDomainUser(&r.FailureDomain.Spec)()
+ res, err := r.AsFailureDomainUser(context.Background(), &r.FailureDomain.Spec)()
+ res, err := r.AsFailureDomainUser(r.RequestCtx, &r.FailureDomain.Spec)()
if r.ShouldReturn(res, err) {
return res, err
}
Expand Down Expand Up @@ -556,6 +557,17 @@ index bf66c25..5ca3e97 100644
+func (c *CloudClientImplementation) GetCloudClientAndUser(ctx context.Context, fdSpec *infrav1.CloudStackFailureDomainSpec) (csClient cloud.Client, csUser cloud.Client, err error) {
+ return c.fdClientFactory.GetCloudClientAndUser(ctx, fdSpec)
+}
diff --git a/metadata.yaml b/metadata.yaml
index bd61395..a030a70 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -7,5 +7,5 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
kind: Metadata
releaseSeries:
- major: 0
- minor: 4
+ minor: 5
contract: v1beta1
diff --git a/pkg/cloud/instance.go b/pkg/cloud/instance.go
index 6fb5857..e622920 100644
--- a/pkg/cloud/instance.go
Expand Down