Skip to content

Commit

Permalink
Bring v1alpha4 CAPI/CAPA and drop externalInfraCluster CRD
Browse files Browse the repository at this point in the history
  • Loading branch information
enxebre committed Jun 1, 2021
1 parent 1c1e583 commit e0fcae6
Show file tree
Hide file tree
Showing 62 changed files with 7,855 additions and 4,119 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.

8 changes: 8 additions & 0 deletions api/v1alpha1/hosted_controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,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
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.0-beta.0
creationTimestamp: null
name: clusterresourcesetbindings.addons.cluster.x-k8s.io
spec:
group: addons.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: ClusterResourceSetBinding
listKind: ClusterResourceSetBindingList
plural: clusterresourcesetbindings
singular: clusterresourcesetbinding
scope: Namespaced
versions:
- name: v1alpha3
schema:
openAPIV3Schema:
description: ClusterResourceSetBinding lists all matching ClusterResourceSets
with the cluster it belongs to.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ClusterResourceSetBindingSpec defines the desired state of
ClusterResourceSetBinding.
properties:
bindings:
description: Bindings is a list of ClusterResourceSets and their resources.
items:
description: ResourceSetBinding keeps info on all of the resources
in a ClusterResourceSet.
properties:
clusterResourceSetName:
description: ClusterResourceSetName is the name of the ClusterResourceSet
that is applied to the owner cluster of the binding.
type: string
resources:
description: Resources is a list of resources that the ClusterResourceSet
has.
items:
description: ResourceBinding shows the status of a resource
that belongs to a ClusterResourceSet matched by the owner
cluster of the ClusterResourceSetBinding object.
properties:
applied:
description: Applied is to track if a resource is applied
to the cluster or not.
type: boolean
hash:
description: Hash is the hash of a resource's data. This
can be used to decide if a resource is changed. For
"ApplyOnce" ClusterResourceSet.spec.strategy, this is
no-op as that strategy does not act on change.
type: string
kind:
description: 'Kind of the resource. Supported kinds are:
Secrets and ConfigMaps.'
enum:
- Secret
- ConfigMap
type: string
lastAppliedTime:
description: LastAppliedTime identifies when this resource
was last applied to the cluster.
format: date-time
type: string
name:
description: Name of the resource that is in the same
namespace with ClusterResourceSet object.
minLength: 1
type: string
required:
- applied
- kind
- name
type: object
type: array
required:
- clusterResourceSetName
type: object
type: array
type: object
type: object
served: true
storage: false
subresources:
status: {}
- name: v1alpha4
schema:
openAPIV3Schema:
description: ClusterResourceSetBinding lists all matching ClusterResourceSets
with the cluster it belongs to.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ClusterResourceSetBindingSpec defines the desired state of
ClusterResourceSetBinding.
properties:
bindings:
description: Bindings is a list of ClusterResourceSets and their resources.
items:
description: ResourceSetBinding keeps info on all of the resources
in a ClusterResourceSet.
properties:
clusterResourceSetName:
description: ClusterResourceSetName is the name of the ClusterResourceSet
that is applied to the owner cluster of the binding.
type: string
resources:
description: Resources is a list of resources that the ClusterResourceSet
has.
items:
description: ResourceBinding shows the status of a resource
that belongs to a ClusterResourceSet matched by the owner
cluster of the ClusterResourceSetBinding object.
properties:
applied:
description: Applied is to track if a resource is applied
to the cluster or not.
type: boolean
hash:
description: Hash is the hash of a resource's data. This
can be used to decide if a resource is changed. For
"ApplyOnce" ClusterResourceSet.spec.strategy, this is
no-op as that strategy does not act on change.
type: string
kind:
description: 'Kind of the resource. Supported kinds are:
Secrets and ConfigMaps.'
enum:
- Secret
- ConfigMap
type: string
lastAppliedTime:
description: LastAppliedTime identifies when this resource
was last applied to the cluster.
format: date-time
type: string
name:
description: Name of the resource that is in the same
namespace with ClusterResourceSet object.
minLength: 1
type: string
required:
- applied
- kind
- name
type: object
type: array
required:
- clusterResourceSetName
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Loading

0 comments on commit e0fcae6

Please sign in to comment.