generated from crossplane/upjet-provider-template
/
zz_server_types.go
executable file
·233 lines (175 loc) · 8.36 KB
/
zz_server_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
/*
Copyright 2022 Upbound Inc.
*/
// Code generated by upjet. DO NOT EDIT.
package v1alpha1
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 PrivateNetworkObservation struct {
// MAC address of the NIC
MacAddress *string `json:"macAddress,omitempty" tf:"mac_address,omitempty"`
// The private NIC state
Status *string `json:"status,omitempty" tf:"status,omitempty"`
}
type PrivateNetworkParameters struct {
// The Private Network ID
// +crossplane:generate:reference:type=github.com/octo-technology/provider-scaleway/apis/vpc/v1alpha1.PrivateNetwork
// +kubebuilder:validation:Optional
PnID *string `json:"pnId,omitempty" tf:"pn_id,omitempty"`
// Reference to a PrivateNetwork in vpc to populate pnId.
// +kubebuilder:validation:Optional
PnIDRef *v1.Reference `json:"pnIdRef,omitempty" tf:"-"`
// Selector for a PrivateNetwork in vpc to populate pnId.
// +kubebuilder:validation:Optional
PnIDSelector *v1.Selector `json:"pnIdSelector,omitempty" tf:"-"`
// The zone you want to attach the resource to
// +kubebuilder:validation:Optional
Zone *string `json:"zone,omitempty" tf:"zone,omitempty"`
}
type RootVolumeObservation struct {
// Name of the root volume
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type RootVolumeParameters struct {
// Set the volume where the boot the server
// +kubebuilder:validation:Optional
Boot *bool `json:"boot,omitempty" tf:"boot,omitempty"`
// Force deletion of the root volume on instance termination
// +kubebuilder:validation:Optional
DeleteOnTermination *bool `json:"deleteOnTermination,omitempty" tf:"delete_on_termination,omitempty"`
// Size of the root volume in gigabytes
// +kubebuilder:validation:Optional
SizeInGb *float64 `json:"sizeInGb,omitempty" tf:"size_in_gb,omitempty"`
// Volume ID of the root volume
// +kubebuilder:validation:Optional
VolumeID *string `json:"volumeId,omitempty" tf:"volume_id,omitempty"`
// Volume type of the root volume
// +kubebuilder:validation:Optional
VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"`
}
type ServerObservation struct {
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The default public IPv6 address routed to the server.
IPv6Address *string `json:"ipv6Address,omitempty" tf:"ipv6_address,omitempty"`
// The IPv6 gateway address
IPv6Gateway *string `json:"ipv6Gateway,omitempty" tf:"ipv6_gateway,omitempty"`
// The IPv6 prefix length routed to the server.
IPv6PrefixLength *float64 `json:"ipv6PrefixLength,omitempty" tf:"ipv6_prefix_length,omitempty"`
// The organization_id you want to attach the resource to
OrganizationID *string `json:"organizationId,omitempty" tf:"organization_id,omitempty"`
// True when the placement group policy is respected
PlacementGroupPolicyRespected *bool `json:"placementGroupPolicyRespected,omitempty" tf:"placement_group_policy_respected,omitempty"`
// The Scaleway internal IP address of the server
PrivateIP *string `json:"privateIp,omitempty" tf:"private_ip,omitempty"`
// List of private network to connect with your instance
// +kubebuilder:validation:Optional
PrivateNetwork []PrivateNetworkObservation `json:"privateNetwork,omitempty" tf:"private_network,omitempty"`
// The public IPv4 address of the server
PublicIP *string `json:"publicIp,omitempty" tf:"public_ip,omitempty"`
// Root volume attached to the server on creation
// +kubebuilder:validation:Optional
RootVolume []RootVolumeObservation `json:"rootVolume,omitempty" tf:"root_volume,omitempty"`
}
type ServerParameters struct {
// The additional volumes attached to the server
// +kubebuilder:validation:Optional
AdditionalVolumeIds []*string `json:"additionalVolumeIds,omitempty" tf:"additional_volume_ids,omitempty"`
// The boot type of the server
// +kubebuilder:validation:Optional
BootType *string `json:"bootType,omitempty" tf:"boot_type,omitempty"`
// ID of the target bootscript (set boot_type to bootscript)
// +kubebuilder:validation:Optional
BootscriptID *string `json:"bootscriptId,omitempty" tf:"bootscript_id,omitempty"`
// The cloud init script associated with this server
// +kubebuilder:validation:Optional
CloudInit *string `json:"cloudInit,omitempty" tf:"cloud_init,omitempty"`
// Enable dynamic IP on the server
// +kubebuilder:validation:Optional
EnableDynamicIP *bool `json:"enableDynamicIp,omitempty" tf:"enable_dynamic_ip,omitempty"`
// Determines if IPv6 is enabled for the server
// +kubebuilder:validation:Optional
EnableIPv6 *bool `json:"enableIpv6,omitempty" tf:"enable_ipv6,omitempty"`
// The ID of the reserved IP for the server
// +kubebuilder:validation:Optional
IPID *string `json:"ipId,omitempty" tf:"ip_id,omitempty"`
// The UUID or the label of the base image used by the server
// +kubebuilder:validation:Optional
Image *string `json:"image,omitempty" tf:"image,omitempty"`
// The name of the server
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The placement group the server is attached to
// +kubebuilder:validation:Optional
PlacementGroupID *string `json:"placementGroupId,omitempty" tf:"placement_group_id,omitempty"`
// List of private network to connect with your instance
// +kubebuilder:validation:Optional
PrivateNetwork []PrivateNetworkParameters `json:"privateNetwork,omitempty" tf:"private_network,omitempty"`
// The project_id you want to attach the resource to
// +kubebuilder:validation:Optional
ProjectID *string `json:"projectId,omitempty" tf:"project_id,omitempty"`
// Root volume attached to the server on creation
// +kubebuilder:validation:Optional
RootVolume []RootVolumeParameters `json:"rootVolume,omitempty" tf:"root_volume,omitempty"`
// The security group the server is attached to
// +kubebuilder:validation:Optional
SecurityGroupID *string `json:"securityGroupId,omitempty" tf:"security_group_id,omitempty"`
// The state of the server should be: started, stopped, standby
// +kubebuilder:validation:Optional
State *string `json:"state,omitempty" tf:"state,omitempty"`
// The tags associated with the server
// +kubebuilder:validation:Optional
Tags []*string `json:"tags,omitempty" tf:"tags,omitempty"`
// The instance type of the server
// +kubebuilder:validation:Required
Type *string `json:"type" tf:"type,omitempty"`
// The user data associated with the server
// +kubebuilder:validation:Optional
UserData map[string]*string `json:"userData,omitempty" tf:"user_data,omitempty"`
// The zone you want to attach the resource to
// +kubebuilder:validation:Optional
Zone *string `json:"zone,omitempty" tf:"zone,omitempty"`
}
// ServerSpec defines the desired state of Server
type ServerSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ServerParameters `json:"forProvider"`
}
// ServerStatus defines the observed state of Server.
type ServerStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ServerObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Server is the Schema for the Servers API. <no value>
// +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,scaleway}
type Server struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ServerSpec `json:"spec"`
Status ServerStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ServerList contains a list of Servers
type ServerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Server `json:"items"`
}
// Repository type metadata.
var (
Server_Kind = "Server"
Server_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Server_Kind}.String()
Server_KindAPIVersion = Server_Kind + "." + CRDGroupVersion.String()
Server_GroupVersionKind = CRDGroupVersion.WithKind(Server_Kind)
)
func init() {
SchemeBuilder.Register(&Server{}, &ServerList{})
}