-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conditions to the DockerMachine object
- Loading branch information
1 parent
b9f2389
commit 48f2010
Showing
6 changed files
with
197 additions
and
30 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
test/infrastructure/docker/api/v1alpha3/condition_consts.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
Copyright 2020 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha3 | ||
|
||
import clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3" | ||
|
||
// Conditions and condition Reasons for the DockerMachine object | ||
|
||
const ConditionsCount = 2 | ||
|
||
const ( | ||
// ContainerProvisionedCondition documents the status of the provisioning of the container | ||
// generated by a DockerMachine. | ||
// | ||
// NOTE: When the container provisioning starts the process completes almost immediately and within | ||
// the same reconciliation, so the user will always see a transition from Wait to Provisioned without | ||
// having evidence that the operation is started/is in progress. | ||
ContainerProvisionedCondition clusterv1.ConditionType = "ContainerProvisioned" | ||
|
||
// WaitingForClusterInfrastructureReason (Severity=Info) documents a DockerMachine waiting for the cluster | ||
// infrastructure to be ready before starting to create the container that provides the DockerMachine | ||
// infrastructure. | ||
WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure" | ||
|
||
// WaitingForBootstrapDataReason (Severity=Info) documents a DockerMachine waiting for the bootstrap | ||
// script to be ready before starting to create the container that provides the DockerMachine infrastructure. | ||
WaitingForBootstrapDataReason = "WaitingForBootstrapData" | ||
|
||
// ContainerProvisioningFailedReason (Severity=Warning) documents a DockerMachine controller detecting | ||
// an error while provisioning the container that provides the DockerMachine infrastructure; those kind of | ||
// errors are usually transient and failed provisioning are automatically re-tried by the controller. | ||
ContainerProvisioningFailedReason = "ContainerProvisioningFailed" | ||
) | ||
|
||
const ( | ||
// BootstrapExecSucceededCondition provide an observation of the DockerMachine bootstrap process. | ||
// The condition gets generated after ContainerProvisionedCondition is True. | ||
// | ||
// NOTE as a difference from other providers, container provisioning and bootstrap are directly managed | ||
// by the DockerMachine controller (not by cloud-init). | ||
BootstrapExecSucceededCondition clusterv1.ConditionType = "BootstrapExecSucceeded" | ||
|
||
// BootstrappingReason documents (Severity=Info) a DockerMachine currently executing the bootstrap | ||
// script that creates the Kubernetes node on the newly provisioned machine infrastructure. | ||
BootstrappingReason = "Bootstrapping" | ||
|
||
// BootstrapFailedReason documents (Severity=Warning) a DockerMachine controller detecting an error while | ||
// bootstrapping the Kubernetes node on the machine just provisioned; those kind of errors are usually | ||
// transient and failed bootstrap are automatically re-tried by the controller. | ||
BootstrapFailedReason = "BootstrapFailed" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
test/infrastructure/docker/api/v1alpha3/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters