Skip to content

Commit fee134f

Browse files
Add ClusterClass support for EKS clusters
Signed-off-by: Alexandr Demicev <[email protected]>
1 parent 777e8de commit fee134f

27 files changed

+2687
-525
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
Copyright 2025 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1beta2
18+
19+
import (
20+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21+
22+
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
23+
)
24+
25+
// AWSManagedClusterTemplateSpec defines the desired state of AWSManagedClusterTemplate.
26+
type AWSManagedClusterTemplateSpec struct {
27+
Template AWSManagedClusterTemplateResource `json:"template"`
28+
}
29+
30+
// +kubebuilder:object:root=true
31+
// +kubebuilder:resource:path=awsmanagedclustertemplates,scope=Namespaced,categories=cluster-api,shortName=amct
32+
// +kubebuilder:storageversion
33+
34+
// AWSManagedClusterTemplate is the Schema for the AWSManagedClusterTemplates API.
35+
type AWSManagedClusterTemplate struct {
36+
metav1.TypeMeta `json:",inline"`
37+
metav1.ObjectMeta `json:"metadata,omitempty"`
38+
39+
Spec AWSManagedClusterTemplateSpec `json:"spec,omitempty"`
40+
}
41+
42+
// +kubebuilder:object:root=true
43+
44+
// AWSManagedClusterTemplateList contains a list of AWSManagedClusterTemplates.
45+
type AWSManagedClusterTemplateList struct {
46+
metav1.TypeMeta `json:",inline"`
47+
metav1.ListMeta `json:"metadata,omitempty"`
48+
Items []AWSManagedClusterTemplate `json:"items"`
49+
}
50+
51+
func init() {
52+
SchemeBuilder.Register(&AWSManagedClusterTemplate{}, &AWSManagedClusterTemplateList{})
53+
}
54+
55+
// AWSManagedClusterTemplateResource describes the data needed to create an AWSManagedCluster from a template.
56+
type AWSManagedClusterTemplateResource struct {
57+
Spec AWSManagedClusterTemplateResourceSpec `json:"spec"`
58+
}
59+
60+
// AWSManagedClusterTemplateResourceSpec defines the desired state of an AWSManagedCluster.
61+
// This is equivalent to AWSManagedClusterSpec.
62+
type AWSManagedClusterTemplateResourceSpec struct {
63+
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
64+
// +optional
65+
ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`
66+
}

api/v1beta2/zz_generated.deepcopy.go

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)