Skip to content

Commit 7a22509

Browse files
authored
Merge pull request #12393 from sivchari/v1beta2-rename-conditions
⚠️ conditions: add V1Beta1 suffix and remove V1Beta2 suffix from condition types and reasons in CAPD v1beta2 packages
2 parents 4852b67 + aa45393 commit 7a22509

File tree

9 files changed

+303
-361
lines changed

9 files changed

+303
-361
lines changed

test/infrastructure/docker/api/v1beta2/devcluster_types.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,44 +29,44 @@ const (
2929
ListenerAnnotationName = "inmemorycluster.infrastructure.cluster.x-k8s.io/listener"
3030
)
3131

32-
// DevCluster's v1Beta2 conditions that apply to all the supported backends.
32+
// DevCluster's conditions that apply to all the supported backends.
3333

34-
// DevCluster's Ready condition and corresponding reasons that will be used in v1Beta2 API version.
34+
// DevCluster's Ready condition and corresponding reasons.
3535
const (
36-
// DevClusterReadyV1Beta2Condition is true if
36+
// DevClusterReadyCondition is true if
3737
// - The DevCluster's is using a docker backend and LoadBalancerAvailable is true.
38-
DevClusterReadyV1Beta2Condition = clusterv1.ReadyCondition
38+
DevClusterReadyCondition = clusterv1.ReadyCondition
3939

40-
// DevClusterReadyV1Beta2Reason surfaces when the DevCluster readiness criteria is met.
41-
DevClusterReadyV1Beta2Reason = clusterv1.ReadyReason
40+
// DevClusterReadyReason surfaces when the DevCluster readiness criteria is met.
41+
DevClusterReadyReason = clusterv1.ReadyReason
4242

43-
// DevClusterNotReadyV1Beta2Reason surfaces when the DevCluster readiness criteria is not met.
44-
DevClusterNotReadyV1Beta2Reason = clusterv1.NotReadyReason
43+
// DevClusterNotReadyReason surfaces when the DevCluster readiness criteria is not met.
44+
DevClusterNotReadyReason = clusterv1.NotReadyReason
4545

46-
// DevClusterReadyUnknownV1Beta2Reason surfaces when at least one DevCluster readiness criteria is unknown
46+
// DevClusterReadyUnknownReason surfaces when at least one DevCluster readiness criteria is unknown
4747
// and no DevCluster readiness criteria is not met.
48-
DevClusterReadyUnknownV1Beta2Reason = clusterv1.ReadyUnknownReason
48+
DevClusterReadyUnknownReason = clusterv1.ReadyUnknownReason
4949
)
5050

51-
// DevCluster's v1Beta2 conditions that apply to the docker backend.
51+
// DevCluster's conditions that apply to the docker backend.
5252

53-
// LoadBalancerAvailable condition and corresponding reasons that will be used in v1Beta2 API version for a DevCluster's docker backend.
53+
// LoadBalancerAvailable condition and corresponding reasons for a DevCluster's docker backend.
5454
const (
55-
// DevClusterDockerLoadBalancerAvailableV1Beta2Condition documents the availability of the container that implements
55+
// DevClusterDockerLoadBalancerAvailableCondition documents the availability of the container that implements
5656
// the load balancer for a DevCluster's docker backend..
57-
DevClusterDockerLoadBalancerAvailableV1Beta2Condition string = "LoadBalancerAvailable"
57+
DevClusterDockerLoadBalancerAvailableCondition string = "LoadBalancerAvailable"
5858

59-
// DevClusterDockerLoadBalancerNotAvailableV1Beta2Reason surfaces when the container that implements
59+
// DevClusterDockerLoadBalancerNotAvailableReason surfaces when the container that implements
6060
// the load balancer for a DevCluster's docker backend is not available.
61-
DevClusterDockerLoadBalancerNotAvailableV1Beta2Reason = clusterv1.NotAvailableReason
61+
DevClusterDockerLoadBalancerNotAvailableReason = clusterv1.NotAvailableReason
6262

63-
// DevClusterDockerLoadBalancerAvailableV1Beta2Reason surfaces when the container that implements
63+
// DevClusterDockerLoadBalancerAvailableReason surfaces when the container that implements
6464
// the load balancer for a DevCluster's docker backend is available.
65-
DevClusterDockerLoadBalancerAvailableV1Beta2Reason = clusterv1.AvailableReason
65+
DevClusterDockerLoadBalancerAvailableReason = clusterv1.AvailableReason
6666

67-
// DevClusterDockerLoadBalancerDeletingV1Beta2Reason surfaces when the container that implements
67+
// DevClusterDockerLoadBalancerDeletingReason surfaces when the container that implements
6868
// the load balancer for a DevCluster's docker backend is deleting.
69-
DevClusterDockerLoadBalancerDeletingV1Beta2Reason = clusterv1.DeletingReason
69+
DevClusterDockerLoadBalancerDeletingReason = clusterv1.DeletingReason
7070
)
7171

7272
// DevClusterSpec defines the desired state of the DevCluster infrastructure.

test/infrastructure/docker/api/v1beta2/devmachine_types.go

Lines changed: 86 additions & 86 deletions
Large diffs are not rendered by default.

test/infrastructure/docker/api/v1beta2/condition_consts.go renamed to test/infrastructure/docker/api/v1beta2/v1beta1_condition_consts.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,65 +23,65 @@ import (
2323
// Conditions and condition Reasons for the DockerMachine object.
2424

2525
const (
26-
// ContainerProvisionedCondition documents the status of the provisioning of the container
26+
// ContainerProvisionedV1Beta1Condition documents the status of the provisioning of the container
2727
// generated by a DockerMachine.
2828
//
2929
// NOTE: When the container provisioning starts the process completes almost immediately and within
3030
// the same reconciliation, so the user will always see a transition from Wait to Provisioned without
3131
// having evidence that the operation is started/is in progress.
32-
ContainerProvisionedCondition clusterv1.ConditionType = "ContainerProvisioned"
32+
ContainerProvisionedV1Beta1Condition clusterv1.ConditionType = "ContainerProvisioned"
3333

34-
// WaitingForClusterInfrastructureReason (Severity=Info) documents a DockerMachine waiting for the cluster
34+
// WaitingForClusterInfrastructureV1Beta1Reason (Severity=Info) documents a DockerMachine waiting for the cluster
3535
// infrastructure to be ready before starting to create the container that provides the DockerMachine
3636
// infrastructure.
37-
WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure"
37+
WaitingForClusterInfrastructureV1Beta1Reason = "WaitingForClusterInfrastructure"
3838

39-
// WaitingForBootstrapDataReason (Severity=Info) documents a DockerMachine waiting for the bootstrap
39+
// WaitingForBootstrapDataV1Beta1Reason (Severity=Info) documents a DockerMachine waiting for the bootstrap
4040
// script to be ready before starting to create the container that provides the DockerMachine infrastructure.
41-
WaitingForBootstrapDataReason = "WaitingForBootstrapData"
41+
WaitingForBootstrapDataV1Beta1Reason = "WaitingForBootstrapData"
4242

43-
// ContainerProvisioningFailedReason (Severity=Warning) documents a DockerMachine controller detecting
43+
// ContainerProvisioningFailedV1Beta1Reason (Severity=Warning) documents a DockerMachine controller detecting
4444
// an error while provisioning the container that provides the DockerMachine infrastructure; those kind of
4545
// errors are usually transient and failed provisioning are automatically re-tried by the controller.
46-
ContainerProvisioningFailedReason = "ContainerProvisioningFailed"
46+
ContainerProvisioningFailedV1Beta1Reason = "ContainerProvisioningFailed"
4747

48-
// ContainerDeletedReason (Severity=Error) documents a DockerMachine controller detecting
48+
// ContainerDeletedV1Beta1Reason (Severity=Error) documents a DockerMachine controller detecting
4949
// the underlying container has been deleted unexpectedly.
50-
ContainerDeletedReason = "ContainerDeleted"
50+
ContainerDeletedV1Beta1Reason = "ContainerDeleted"
5151
)
5252

5353
const (
54-
// BootstrapExecSucceededCondition provides an observation of the DockerMachine bootstrap process.
54+
// BootstrapExecSucceededV1Beta1Condition provides an observation of the DockerMachine bootstrap process.
5555
// It is set based on successful execution of bootstrap commands and on the existence of
5656
// the /run/cluster-api/bootstrap-success.complete file.
5757
// The condition gets generated after ContainerProvisionedCondition is True.
5858
//
5959
// NOTE as a difference from other providers, container provisioning and bootstrap are directly managed
6060
// by the DockerMachine controller (not by cloud-init).
61-
BootstrapExecSucceededCondition clusterv1.ConditionType = "BootstrapExecSucceeded"
61+
BootstrapExecSucceededV1Beta1Condition clusterv1.ConditionType = "BootstrapExecSucceeded"
6262

63-
// BootstrappingReason documents (Severity=Info) a DockerMachine currently executing the bootstrap
63+
// BootstrappingV1Beta1Reason documents (Severity=Info) a DockerMachine currently executing the bootstrap
6464
// script that creates the Kubernetes node on the newly provisioned machine infrastructure.
65-
BootstrappingReason = "Bootstrapping"
65+
BootstrappingV1Beta1Reason = "Bootstrapping"
6666

67-
// BootstrapFailedReason documents (Severity=Warning) a DockerMachine controller detecting an error while
67+
// BootstrapFailedV1Beta1Reason documents (Severity=Warning) a DockerMachine controller detecting an error while
6868
// bootstrapping the Kubernetes node on the machine just provisioned; those kind of errors are usually
6969
// transient and failed bootstrap are automatically re-tried by the controller.
70-
BootstrapFailedReason = "BootstrapFailed"
70+
BootstrapFailedV1Beta1Reason = "BootstrapFailed"
7171
)
7272

7373
// Conditions and condition Reasons for the DockerCluster object.
7474

7575
const (
76-
// LoadBalancerAvailableCondition documents the availability of the container that implements the cluster load balancer.
76+
// LoadBalancerAvailableV1Beta1Condition documents the availability of the container that implements the cluster load balancer.
7777
//
7878
// NOTE: When the load balancer provisioning starts the process completes almost immediately and within
7979
// the same reconciliation, so the user will always see a transition from no condition to available without
8080
// having evidence that the operation is started/is in progress.
81-
LoadBalancerAvailableCondition clusterv1.ConditionType = "LoadBalancerAvailable"
81+
LoadBalancerAvailableV1Beta1Condition clusterv1.ConditionType = "LoadBalancerAvailable"
8282

83-
// LoadBalancerProvisioningFailedReason (Severity=Warning) documents a DockerCluster controller detecting
83+
// LoadBalancerProvisioningFailedV1Beta1Reason (Severity=Warning) documents a DockerCluster controller detecting
8484
// an error while provisioning the container that provides the cluster load balancer.; those kind of
8585
// errors are usually transient and failed provisioning are automatically re-tried by the controller.
86-
LoadBalancerProvisioningFailedReason = "LoadBalancerProvisioningFailed"
86+
LoadBalancerProvisioningFailedV1Beta1Reason = "LoadBalancerProvisioningFailed"
8787
)

test/infrastructure/docker/api/v1beta2/v1beta2_condition_consts.go

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)