Skip to content
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
60 changes: 60 additions & 0 deletions api/v1beta2/awsmanagedclustertemplate_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
Copyright 2025 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta2

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// AWSManagedClusterTemplateSpec defines the desired state of AWSManagedClusterTemplate.
type AWSManagedClusterTemplateSpec struct {
Template AWSManagedClusterTemplateResource `json:"template"`
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=awsmanagedclustertemplates,scope=Namespaced,categories=cluster-api,shortName=amct
// +kubebuilder:storageversion

// AWSManagedClusterTemplate is the Schema for the AWSManagedClusterTemplates API.
type AWSManagedClusterTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec AWSManagedClusterTemplateSpec `json:"spec,omitempty"`
}

// +kubebuilder:object:root=true

// AWSManagedClusterTemplateList contains a list of AWSManagedClusterTemplates.
type AWSManagedClusterTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AWSManagedClusterTemplate `json:"items"`
}

func init() {
SchemeBuilder.Register(&AWSManagedClusterTemplate{}, &AWSManagedClusterTemplateList{})
}

// AWSManagedClusterTemplateResource describes the data needed to create an AWSManagedCluster from a template.
type AWSManagedClusterTemplateResource struct {
Spec AWSManagedClusterTemplateResourceSpec `json:"spec"`
}

// AWSManagedClusterTemplateResourceSpec defines the desired state of an AWSManagedCluster. Note that
// this object is needed to satisfy the ClusterClass contract.
type AWSManagedClusterTemplateResourceSpec struct{}
105 changes: 105 additions & 0 deletions api/v1beta2/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: awsmanagedclustertemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: AWSManagedClusterTemplate
listKind: AWSManagedClusterTemplateList
plural: awsmanagedclustertemplates
shortNames:
- amct
singular: awsmanagedclustertemplate
scope: Namespaced
versions:
- name: v1beta2
schema:
openAPIV3Schema:
description: AWSManagedClusterTemplate is the Schema for the AWSManagedClusterTemplates
API.
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: AWSManagedClusterTemplateSpec defines the desired state of
AWSManagedClusterTemplate.
properties:
template:
description: AWSManagedClusterTemplateResource describes the data
needed to create an AWSManagedCluster from a template.
properties:
spec:
description: |-
AWSManagedClusterTemplateResourceSpec defines the desired state of an AWSManagedCluster. Note that
this object is needed to satisfy the ClusterClass contract.
type: object
required:
- spec
type: object
required:
- template
type: object
type: object
served: true
storage: true
Loading