generated from crossplane/upjet-provider-template
/
zz_cluster_types.go
executable file
·263 lines (200 loc) · 10.8 KB
/
zz_cluster_types.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
/*
Copyright 2022 Upbound Inc.
*/
// Code generated by upjet. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type CertificateClustersObservation struct {
// The certificate data.
CertificateAuthorityData *string `json:"certificateAuthorityData,omitempty" tf:"certificate_authority_data,omitempty"`
// The cluster name.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The server IP address.
Server *string `json:"server,omitempty" tf:"server,omitempty"`
}
type CertificateClustersParameters struct {
}
type CertificateUsersObservation struct {
// The client certificate data.
ClientCertificateData *string `json:"clientCertificateData,omitempty" tf:"client_certificate_data,omitempty"`
// The client key data.
ClientKeyData *string `json:"clientKeyData,omitempty" tf:"client_key_data,omitempty"`
// The user name.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type CertificateUsersParameters struct {
}
type ClusterObservation struct {
CertificateClusters []CertificateClustersObservation `json:"certificateClusters,omitempty" tf:"certificate_clusters,omitempty"`
CertificateUsers []CertificateUsersObservation `json:"certificateUsers,omitempty" tf:"certificate_users,omitempty"`
// The endpoint of the cluster to be accessed through API Gateway.
ExternalApigEndpoint *string `json:"externalApigEndpoint,omitempty" tf:"external_apig_endpoint,omitempty"`
// The external network address.
ExternalEndpoint *string `json:"externalEndpoint,omitempty" tf:"external_endpoint,omitempty"`
// Id of the cluster resource.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The internal network address.
InternalEndpoint *string `json:"internalEndpoint,omitempty" tf:"internal_endpoint,omitempty"`
// Security group ID of the cluster.
SecurityGroupID *string `json:"securityGroupId,omitempty" tf:"security_group_id,omitempty"`
// Cluster status information.
Status *string `json:"status,omitempty" tf:"status,omitempty"`
}
type ClusterParameters struct {
// Cluster annotation, key/value pair format.
// Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Optional
Annotations map[string]*string `json:"annotations,omitempty" tf:"annotations,omitempty"`
// CA root certificate provided in the authenticating_proxy mode. The CA root certificate
// is encoded to the Base64 format. Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Optional
AuthenticatingProxyCA *string `json:"authenticatingProxyCa,omitempty" tf:"authenticating_proxy_ca,omitempty"`
// Authentication mode of the cluster, possible values are x509 and rbac. Defaults to rbac.
// Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Optional
AuthenticationMode *string `json:"authenticationMode,omitempty" tf:"authentication_mode,omitempty"`
// Charging mode of the cluster, which is 0 (on demand).
// Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Optional
BillingMode *float64 `json:"billingMode,omitempty" tf:"billing_mode,omitempty"`
// Cluster Type, possible values are VirtualMachine and BareMetal.
// Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Required
ClusterType *string `json:"clusterType" tf:"cluster_type,omitempty"`
// For the cluster version, possible values are listed on the
// CCE Cluster Version Release Notes.
// If this parameter is not set, the latest available version will be used.
// +kubebuilder:validation:Optional
ClusterVersion *string `json:"clusterVersion,omitempty" tf:"cluster_version,omitempty"`
// Container network segment. Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Optional
ContainerNetworkCidr *string `json:"containerNetworkCidr,omitempty" tf:"container_network_cidr,omitempty"`
// Container network parameters. Possible values:
// +kubebuilder:validation:Required
ContainerNetworkType *string `json:"containerNetworkType" tf:"container_network_type,omitempty"`
// Cluster description.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// EIP address of the cluster.
// +crossplane:generate:reference:type=github.com/FlexibleEngineCloud/provider-flexibleengine/apis/eip/v1beta1.EIP
// +crossplane:generate:reference:extractor=github.com/FlexibleEngineCloud/provider-flexibleengine/pkg/tools.ExtractorParamPathfunc(true, "address")
// +kubebuilder:validation:Optional
EIP *string `json:"eip,omitempty" tf:"eip,omitempty"`
// Reference to a EIP in eip to populate eip.
// +kubebuilder:validation:Optional
EIPRef *v1.Reference `json:"eipRef,omitempty" tf:"-"`
// Selector for a EIP in eip to populate eip.
// +kubebuilder:validation:Optional
EIPSelector *v1.Selector `json:"eipSelector,omitempty" tf:"-"`
// Extended parameter. Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Optional
ExtendParam map[string]*string `json:"extendParam,omitempty" tf:"extend_param,omitempty"`
// Cluster specifications. Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Required
FlavorID *string `json:"flavorId" tf:"flavor_id,omitempty"`
// The ID of the high speed network used to create bare metal nodes.
// Changing this parameter will create a new cluster resource.
// +crossplane:generate:reference:type=github.com/FlexibleEngineCloud/provider-flexibleengine/apis/vpc/v1beta1.VPCSubnet
// +kubebuilder:validation:Optional
HighwaySubnetID *string `json:"highwaySubnetId,omitempty" tf:"highway_subnet_id,omitempty"`
// Reference to a VPCSubnet in vpc to populate highwaySubnetId.
// +kubebuilder:validation:Optional
HighwaySubnetIDRef *v1.Reference `json:"highwaySubnetIdRef,omitempty" tf:"-"`
// Selector for a VPCSubnet in vpc to populate highwaySubnetId.
// +kubebuilder:validation:Optional
HighwaySubnetIDSelector *v1.Selector `json:"highwaySubnetIdSelector,omitempty" tf:"-"`
// Service forwarding mode. Two modes are available:
// +kubebuilder:validation:Optional
KubeProxyMode *string `json:"kubeProxyMode,omitempty" tf:"kube_proxy_mode,omitempty"`
// Cluster tag, key/value pair format. Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Optional
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Advanced configuration of master nodes. Changing this creates a new cluster.
// +kubebuilder:validation:Optional
Masters []MastersParameters `json:"masters,omitempty" tf:"masters,omitempty"`
// Cluster name. Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// +kubebuilder:validation:Optional
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// Service network segment. Changing this parameter will create a new cluster resource.
// +kubebuilder:validation:Optional
ServiceNetworkCidr *string `json:"serviceNetworkCidr,omitempty" tf:"service_network_cidr,omitempty"`
// The ID of the VPC Subnet used to create the node.
// Changing this parameter will create a new cluster resource.
// +crossplane:generate:reference:type=github.com/FlexibleEngineCloud/provider-flexibleengine/apis/vpc/v1beta1.VPCSubnet
// +crossplane:generate:reference:extractor=github.com/FlexibleEngineCloud/provider-flexibleengine/pkg/tools.ExtractorParamPathfunc(true, "id")
// +crossplane:generate:reference:refFieldName=SubnetIDRef
// +crossplane:generate:reference:selectorFieldName=SubnetIDSelector
// +kubebuilder:validation:Optional
SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"`
// Reference to a VPCSubnet in vpc to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"`
// Selector for a VPCSubnet in vpc to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"`
// The ID of the VPC used to create the node. Changing this parameter will create a new cluster resource.
// +crossplane:generate:reference:type=github.com/FlexibleEngineCloud/provider-flexibleengine/apis/vpc/v1beta1.VPC
// +kubebuilder:validation:Optional
VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"`
// Reference to a VPC in vpc to populate vpcId.
// +kubebuilder:validation:Optional
VPCIDRef *v1.Reference `json:"vpcIdRef,omitempty" tf:"-"`
// Selector for a VPC in vpc to populate vpcId.
// +kubebuilder:validation:Optional
VPCIDSelector *v1.Selector `json:"vpcIdSelector,omitempty" tf:"-"`
}
type MastersObservation struct {
}
type MastersParameters struct {
// Specifies the availability zone of the master node.
// Changing this creates a new cluster.
// +kubebuilder:validation:Optional
AvailabilityZone *string `json:"availabilityZone,omitempty" tf:"availability_zone,omitempty"`
}
// ClusterSpec defines the desired state of Cluster
type ClusterSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ClusterParameters `json:"forProvider"`
}
// ClusterStatus defines the observed state of Cluster.
type ClusterStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ClusterObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Cluster is the Schema for the Clusters API. ""page_title: "flexibleengine_cce_cluster_v3"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,flexibleengine}
type Cluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterSpec `json:"spec"`
Status ClusterStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ClusterList contains a list of Clusters
type ClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Cluster `json:"items"`
}
// Repository type metadata.
var (
Cluster_Kind = "Cluster"
Cluster_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Cluster_Kind}.String()
Cluster_KindAPIVersion = Cluster_Kind + "." + CRDGroupVersion.String()
Cluster_GroupVersionKind = CRDGroupVersion.WithKind(Cluster_Kind)
)
func init() {
SchemeBuilder.Register(&Cluster{}, &ClusterList{})
}