-
Notifications
You must be signed in to change notification settings - Fork 28
/
cluster.go
161 lines (152 loc) · 8.28 KB
/
cluster.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file accompanying this file. This file 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.
// Code generated by ack-generate. DO NOT EDIT.
package v1alpha1
import (
ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ClusterSpec defines the desired state of Cluster.
//
// An object representing an Amazon EKS cluster.
type ClusterSpec struct {
// The access configuration for the cluster.
AccessConfig *CreateAccessConfigRequest `json:"accessConfig,omitempty"`
// A unique, case-sensitive identifier that you provide to ensure the idempotency
// of the request.
ClientRequestToken *string `json:"clientRequestToken,omitempty"`
// The encryption configuration for the cluster.
EncryptionConfig []*EncryptionConfig `json:"encryptionConfig,omitempty"`
// The Kubernetes network configuration for the cluster.
KubernetesNetworkConfig *KubernetesNetworkConfigRequest `json:"kubernetesNetworkConfig,omitempty"`
// Enable or disable exporting the Kubernetes control plane logs for your cluster
// to CloudWatch Logs. By default, cluster control plane logs aren't exported
// to CloudWatch Logs. For more information, see Amazon EKS Cluster control
// plane logs (https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html)
// in the Amazon EKS User Guide .
//
// CloudWatch Logs ingestion, archive storage, and data scanning rates apply
// to exported control plane logs. For more information, see CloudWatch Pricing
// (http://aws.amazon.com/cloudwatch/pricing/).
Logging *Logging `json:"logging,omitempty"`
// The unique name to give to your cluster.
// +kubebuilder:validation:Required
Name *string `json:"name"`
// An object representing the configuration of your local Amazon EKS cluster
// on an Amazon Web Services Outpost. Before creating a local cluster on an
// Outpost, review Local clusters for Amazon EKS on Amazon Web Services Outposts
// (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html)
// in the Amazon EKS User Guide. This object isn't available for creating Amazon
// EKS clusters on the Amazon Web Services cloud.
OutpostConfig *OutpostConfigRequest `json:"outpostConfig,omitempty"`
// The VPC configuration that's used by the cluster control plane. Amazon EKS
// VPC resources have specific requirements to work properly with Kubernetes.
// For more information, see Cluster VPC Considerations (https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html)
// and Cluster Security Group Considerations (https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html)
// in the Amazon EKS User Guide. You must specify at least two subnets. You
// can specify up to five security groups. However, we recommend that you use
// a dedicated security group for your cluster control plane.
// +kubebuilder:validation:Required
ResourcesVPCConfig *VPCConfigRequest `json:"resourcesVPCConfig"`
// The Amazon Resource Name (ARN) of the IAM role that provides permissions
// for the Kubernetes control plane to make calls to Amazon Web Services API
// operations on your behalf. For more information, see Amazon EKS Service IAM
// Role (https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html)
// in the Amazon EKS User Guide .
RoleARN *string `json:"roleARN,omitempty"`
RoleRef *ackv1alpha1.AWSResourceReferenceWrapper `json:"roleRef,omitempty"`
// Metadata that assists with categorization and organization. Each tag consists
// of a key and an optional value. You define both. Tags don't propagate to
// any other cluster or Amazon Web Services resources.
Tags map[string]*string `json:"tags,omitempty"`
// The desired Kubernetes version for your cluster. If you don't specify a value
// here, the default version available in Amazon EKS is used.
//
// The default version might not be the latest version available.
Version *string `json:"version,omitempty"`
}
// ClusterStatus defines the observed state of Cluster
type ClusterStatus struct {
// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
// that is used to contain resource sync state, account ownership,
// constructed ARN for the resource
// +kubebuilder:validation:Optional
ACKResourceMetadata *ackv1alpha1.ResourceMetadata `json:"ackResourceMetadata"`
// All CRS managed by ACK have a common `Status.Conditions` member that
// contains a collection of `ackv1alpha1.Condition` objects that describe
// the various terminal states of the CR and its backend AWS service API
// resource
// +kubebuilder:validation:Optional
Conditions []*ackv1alpha1.Condition `json:"conditions"`
// The certificate-authority-data for your cluster.
// +kubebuilder:validation:Optional
CertificateAuthority *Certificate `json:"certificateAuthority,omitempty"`
// The configuration used to connect to a cluster for registration.
// +kubebuilder:validation:Optional
ConnectorConfig *ConnectorConfigResponse `json:"connectorConfig,omitempty"`
// The Unix epoch timestamp at object creation.
// +kubebuilder:validation:Optional
CreatedAt *metav1.Time `json:"createdAt,omitempty"`
// The endpoint for your Kubernetes API server.
// +kubebuilder:validation:Optional
Endpoint *string `json:"endpoint,omitempty"`
// An object representing the health of your local Amazon EKS cluster on an
// Amazon Web Services Outpost. This object isn't available for clusters on
// the Amazon Web Services cloud.
// +kubebuilder:validation:Optional
Health *ClusterHealth `json:"health,omitempty"`
// The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost.
// This property isn't available for an Amazon EKS cluster on the Amazon Web
// Services cloud.
// +kubebuilder:validation:Optional
ID *string `json:"id,omitempty"`
// The identity provider information for the cluster.
// +kubebuilder:validation:Optional
Identity *Identity `json:"identity,omitempty"`
// The platform version of your Amazon EKS cluster. For more information about
// clusters deployed on the Amazon Web Services Cloud, see Platform versions
// (https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html)
// in the Amazon EKS User Guide . For more information about local clusters
// deployed on an Outpost, see Amazon EKS local cluster platform versions (https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-platform-versions.html)
// in the Amazon EKS User Guide .
// +kubebuilder:validation:Optional
PlatformVersion *string `json:"platformVersion,omitempty"`
// The current status of the cluster.
// +kubebuilder:validation:Optional
Status *string `json:"status,omitempty"`
}
// Cluster is the Schema for the Clusters API
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="VERSION",type=string,priority=0,JSONPath=`.spec.version`
// +kubebuilder:printcolumn:name="STATUS",type=string,priority=0,JSONPath=`.status.status`
// +kubebuilder:printcolumn:name="PLATFORMVERSION",type=string,priority=1,JSONPath=`.status.platformVersion`
// +kubebuilder:printcolumn:name="ENDPOINT",type=string,priority=1,JSONPath=`.status.endpoint`
// +kubebuilder:printcolumn:name="Synced",type="string",priority=0,JSONPath=".status.conditions[?(@.type==\"ACK.ResourceSynced\")].status"
// +kubebuilder:printcolumn:name="Age",type="date",priority=0,JSONPath=".metadata.creationTimestamp"
type Cluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterSpec `json:"spec,omitempty"`
Status ClusterStatus `json:"status,omitempty"`
}
// ClusterList contains a list of Cluster
// +kubebuilder:object:root=true
type ClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Cluster `json:"items"`
}
func init() {
SchemeBuilder.Register(&Cluster{}, &ClusterList{})
}