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

Drop ExternalInfraCluster CRD in favour of AWSCluster #272

Merged
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
2 changes: 1 addition & 1 deletion api/scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
clientgoscheme "k8s.io/client-go/kubernetes/scheme"

capiv1 "github.com/openshift/hypershift/thirdparty/clusterapi/api/v1alpha4"
capiaws "github.com/openshift/hypershift/thirdparty/clusterapiprovideraws/v1alpha3"
capiaws "github.com/openshift/hypershift/thirdparty/clusterapiprovideraws/v1alpha4"
etcd "github.com/openshift/hypershift/thirdparty/etcd/v1beta2"

hyperv1 "github.com/openshift/hypershift/api/v1alpha1"
Expand Down
59 changes: 0 additions & 59 deletions api/v1alpha1/externalinfracluster.go

This file was deleted.

18 changes: 18 additions & 0 deletions api/v1alpha1/hosted_controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,20 @@ type HostedControlPlaneCondition struct {
type HostedControlPlaneStatus struct {
// Ready denotes that the HostedControlPlane API Server is ready to
// receive requests
// This satisfies CAPI contract https://github.com/kubernetes-sigs/cluster-api/blob/cd3a694deac89d5ebeb888307deaa61487207aa0/controllers/cluster_controller_phases.go#L226-L230
// +kubebuilder:validation:Required
// +kubebuilder:default=false
Ready bool `json:"ready"`

// Initialized denotes whether or not the control plane has
// provided a kubeadm-config.
// Once this condition is marked true, its value is never changed. See the Ready condition for an indication of
// the current readiness of the cluster's control plane.
// This satisfies CAPI contract https://github.com/kubernetes-sigs/cluster-api/blob/cd3a694deac89d5ebeb888307deaa61487207aa0/controllers/cluster_controller_phases.go#L238-L252
// +kubebuilder:validation:Required
// +kubebuilder:default=false
Initialized bool `json:"initialized"`

// ExternalManagedControlPlane indicates to cluster-api that the control plane
// is managed by an external service.
// https://github.com/kubernetes-sigs/cluster-api/blob/65e5385bffd71bf4aad3cf34a537f11b217c7fab/controllers/machine_controller.go#L468
Expand Down Expand Up @@ -146,6 +156,14 @@ type HostedControlPlaneStatus struct {
Conditions []HostedControlPlaneCondition `json:"conditions"`
}

type APIEndpoint struct {
// Host is the hostname on which the API server is serving.
Host string `json:"host"`

// Port is the port on which the API server is serving.
Port int32 `json:"port"`
}

// +kubebuilder:object:root=true
// HostedControlPlaneList contains a list of HostedControlPlanes.
type HostedControlPlaneList struct {
Expand Down
90 changes: 0 additions & 90 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/cluster/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/openshift/hypershift/cmd/util"
"github.com/openshift/hypershift/hypershift-operator/controllers/manifests"
capiv1 "github.com/openshift/hypershift/thirdparty/clusterapi/api/v1alpha4"
capiaws "github.com/openshift/hypershift/thirdparty/clusterapiprovideraws/v1alpha3"
capiaws "github.com/openshift/hypershift/thirdparty/clusterapiprovideraws/v1alpha4"
)

type DumpOptions struct {
Expand Down Expand Up @@ -110,8 +110,8 @@ func DumpCluster(ctx context.Context, opts *DumpOptions) error {
&capiv1.MachineSet{},
&capiaws.AWSMachine{},
&capiaws.AWSMachineTemplate{},
&capiaws.AWSCluster{},
&hyperv1.HostedControlPlane{},
&hyperv1.ExternalInfraCluster{},
}
resourceList := strings.Join(resourceTypes(resources), ",")
cmd.WithNamespace(controlPlaneNamespace).Run(resourceList)
Expand Down
Loading