Skip to content

Commit 296cbc0

Browse files
authored
⚠️ conditions: add V1Beta1 suffix and remove V1Beta2 suffix from condition types and reasons in v1beta2 packages (#12091)
* conditions: add V1Beta1 suffix to v1beta1 condition types * conditions: fix usage of ClusterClassNotReconciled reason for v1beta2 * conditions: add V1Beta1 suffix to v1beta1 reasons * conditions: remove V1Beta2 suffix from v1beta2 condition types * conditions: remove V1Beta2 suffix from v1beta2 condition reasons * review fix 1 * clusterresourceset: review fixes * rename v1beta2/condition_consts.go to v1beta1_condition_consts.go * rename v1beta2/v1beta2_condition_consts.go to condition_consts.go * removev v1beta2/condition_consts.go for CABK and CAKCP * generate * fixup machinepool v1beta2 conditions in v1beta1 package * fix extensionconfig condition naming * review fixes * fix kubeadm deepcopy * review fixes * clusterctl: move Node's .status.conditions to .status.deprecated.v1beta1.conditions * clusterctl: move Node's .status.v1beta2.conditions to .status.deprecated.conditions
1 parent 673d84b commit 296cbc0

File tree

139 files changed

+5521
-5554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+5521
-5554
lines changed

api/addons/v1beta2/clusterresourceset_types.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@ import (
2323
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2"
2424
)
2525

26-
// ClusterResourceSet's ResourcesApplied condition and corresponding reasons that will be used in v1Beta2 API version.
26+
// ClusterResourceSet's ResourcesApplied condition and corresponding reasons.
2727
const (
28-
// ResourcesAppliedV1Beta2Condition surfaces wether the resources in the ClusterResourceSet are applied to all matching clusters.
28+
// ClusterResourceSetResourcesAppliedCondition surfaces wether the resources in the ClusterResourceSet are applied to all matching clusters.
2929
// This indicates all resources exist, and no errors during applying them to all clusters.
30-
ResourcesAppliedV1Beta2Condition = "ResourcesApplied"
30+
ClusterResourceSetResourcesAppliedCondition = "ResourcesApplied"
3131

32-
// ResourcesAppliedV1beta2Reason is the reason used when all resources in the ClusterResourceSet object got applied
32+
// ClusterResourceSetResourcesAppliedReason is the reason used when all resources in the ClusterResourceSet object got applied
3333
// to all matching clusters.
34-
ResourcesAppliedV1beta2Reason = "Applied"
34+
ClusterResourceSetResourcesAppliedReason = "Applied"
3535

36-
// ResourcesNotAppliedV1Beta2Reason is the reason used when applying at least one of the resources to one of the matching clusters failed.
37-
ResourcesNotAppliedV1Beta2Reason = "NotApplied"
36+
// ClusterResourceSetResourcesNotAppliedReason is the reason used when applying at least one of the resources to one of the matching clusters failed.
37+
ClusterResourceSetResourcesNotAppliedReason = "NotApplied"
3838

39-
// ResourcesAppliedWrongSecretTypeV1Beta2Reason is the reason used when the Secret's type in the resource list is not supported.
40-
ResourcesAppliedWrongSecretTypeV1Beta2Reason = "WrongSecretType"
39+
// ClusterResourceSetResourcesAppliedWrongSecretTypeReason is the reason used when the Secret's type in the resource list is not supported.
40+
ClusterResourceSetResourcesAppliedWrongSecretTypeReason = "WrongSecretType"
4141

42-
// ResourcesAppliedInternalErrorV1Beta2Reason surfaces unexpected failures when reconciling a ClusterResourceSet.
43-
ResourcesAppliedInternalErrorV1Beta2Reason = clusterv1.InternalErrorV1Beta2Reason
42+
// ClusterResourceSetResourcesAppliedInternalErrorReason surfaces unexpected failures when reconciling a ClusterResourceSet.
43+
ClusterResourceSetResourcesAppliedInternalErrorReason = clusterv1.InternalErrorReason
4444
)
4545

4646
const (
@@ -120,7 +120,7 @@ func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy)
120120
// ClusterResourceSetStatus defines the observed state of ClusterResourceSet.
121121
type ClusterResourceSetStatus struct {
122122
// conditions represents the observations of a ClusterResourceSet's current state.
123-
// Known condition types are ResourceSetApplied, Deleting.
123+
// Known condition types are ResourcesApplied.
124124
// +optional
125125
// +listType=map
126126
// +listMapKey=type

api/addons/v1beta2/condition_consts.go

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
Copyright 2025 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1beta2
18+
19+
import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta2"
20+
21+
// Conditions and condition Reasons for the ClusterResourceSet object.
22+
const (
23+
// ResourcesAppliedV1Beta1Condition documents that all resources in the ClusterResourceSet object are applied to
24+
// all matching clusters. This indicates all resources exist, and no errors during applying them to all clusters.
25+
ResourcesAppliedV1Beta1Condition clusterv1.ConditionType = "ResourcesApplied"
26+
27+
// RemoteClusterClientFailedV1Beta1Reason (Severity=Error) documents failure during getting the remote cluster client.
28+
RemoteClusterClientFailedV1Beta1Reason = "RemoteClusterClientFailed"
29+
30+
// ClusterMatchFailedV1Beta1Reason (Severity=Warning) documents failure getting clusters that match the clusterSelector.
31+
ClusterMatchFailedV1Beta1Reason = "ClusterMatchFailed"
32+
33+
// ApplyFailedV1Beta1Reason (Severity=Warning) documents applying at least one of the resources to one of the matching clusters is failed.
34+
ApplyFailedV1Beta1Reason = "ApplyFailed"
35+
36+
// RetrievingResourceFailedV1Beta1Reason (Severity=Warning) documents at least one of the resources are not successfully retrieved.
37+
RetrievingResourceFailedV1Beta1Reason = "RetrievingResourceFailed"
38+
39+
// WrongSecretTypeV1Beta1Reason (Severity=Warning) documents at least one of the Secret's type in the resource list is not supported.
40+
WrongSecretTypeV1Beta1Reason = "WrongSecretType"
41+
)

0 commit comments

Comments
 (0)