Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit d24f26c

Browse files
authored
Merge pull request #38 from chuckha/ready
Use a ready/bool instead of phase
2 parents 758f53b + 4204638 commit d24f26c

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

api/v1alpha1/kubeadmbootstrapconfig_types.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@ import (
2121
kubeadmv1beta1 "sigs.k8s.io/cluster-api-bootstrap-provider-kubeadm/kubeadm/v1beta1"
2222
)
2323

24-
// Phase defines KubeadmBootstrapConfig phases
25-
type Phase string
26-
27-
// Ready defines the KubeadmBootstrapConfig Ready Phase
28-
const (
29-
// Ready indicates the config is ready to be used by a Machine.
30-
Ready Phase = "Ready"
31-
)
32-
3324
// KubeadmBootstrapConfigSpec defines the desired state of KubeadmBootstrapConfig
3425
type KubeadmBootstrapConfigSpec struct {
3526
ClusterConfiguration kubeadmv1beta1.ClusterConfiguration `json:"clusterConfiguration"`
@@ -39,8 +30,8 @@ type KubeadmBootstrapConfigSpec struct {
3930

4031
// KubeadmBootstrapConfigStatus defines the observed state of KubeadmBootstrapConfig
4132
type KubeadmBootstrapConfigStatus struct {
42-
// Phase is the state of the KubeadmBootstrapConfig object
43-
Phase Phase `json:"phase"`
33+
// Ready indicates the BootstrapData field is ready to be consumed
34+
Ready bool `json:"phase,omitempty"`
4435

4536
// BootstrapData will be a cloud-init script for now
4637
// +optional

config/crd/bases/kubeadm.bootstrap.cluster.sigs.k8s.io_kubeadmbootstrapconfigs.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,10 +1059,9 @@ spec:
10591059
format: byte
10601060
type: string
10611061
phase:
1062-
description: Phase is the state of the KubeadmBootstrapConfig object
1063-
type: string
1064-
required:
1065-
- phase
1062+
description: Ready indicates the BootstrapData field is ready to be
1063+
consumed
1064+
type: boolean
10661065
type: object
10671066
type: object
10681067
versions:

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ require (
1212
k8s.io/apimachinery v0.0.0-20190704094733-8f6ac2502e51
1313
k8s.io/client-go v11.0.1-0.20190704100234-640d9f240853+incompatible
1414
k8s.io/cluster-bootstrap v0.0.0-20190703212826-5ad085674a4f
15+
k8s.io/klog v0.3.1
1516
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a // indirect
1617
sigs.k8s.io/cluster-api v0.0.0-20190711133056-09e491e49d7c
1718
sigs.k8s.io/controller-runtime v0.2.0-beta.4

0 commit comments

Comments
 (0)