Skip to content

Commit

Permalink
Merge pull request #272 from enxebre/aws-external-infra-clean
Browse files Browse the repository at this point in the history
Drop ExternalInfraCluster CRD in favour of AWSCluster
  • Loading branch information
openshift-merge-robot authored Jun 3, 2021
2 parents c35b217 + 0ef36e1 commit 64958e3
Show file tree
Hide file tree
Showing 71 changed files with 7,997 additions and 4,330 deletions.
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

0 comments on commit 64958e3

Please sign in to comment.