generated from crossplane/upjet-provider-template
/
zz_civokubernetescluster_types.go
executable file
·189 lines (140 loc) · 7.69 KB
/
zz_civokubernetescluster_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
/*
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 CivoKubernetesClusterObservation struct {
// The API server endpoint of the cluster
APIEndpoint *string `json:"apiEndpoint,omitempty" tf:"api_endpoint,omitempty"`
// The timestamp when the cluster was created
CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"`
// The DNS name of the cluster
DNSEntry *string `json:"dnsEntry,omitempty" tf:"dns_entry,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
InstalledApplications []InstalledApplicationsObservation `json:"installedApplications,omitempty" tf:"installed_applications,omitempty"`
// The IP address of the master node
MasterIP *string `json:"masterIp,omitempty" tf:"master_ip,omitempty"`
// +kubebuilder:validation:Required
Pools []PoolsObservation `json:"pools,omitempty" tf:"pools,omitempty"`
// When cluster is ready, this will return `true`
Ready *bool `json:"ready,omitempty" tf:"ready,omitempty"`
// Status of the cluster
Status *string `json:"status,omitempty" tf:"status,omitempty"`
}
type CivoKubernetesClusterParameters struct {
// Comma separated list of applications to install. Spaces within application names are fine, but shouldn't be either side of the comma. Application names are case-sensitive; the available applications can be listed with the Civo CLI: 'civo kubernetes applications ls'. If you want to remove a default installed application, prefix it with a '-', e.g. -Traefik. For application that supports plans, you can use 'app_name:app_plan' format e.g. 'Linkerd:Linkerd & Jaeger' or 'MariaDB:5GB'.
// +kubebuilder:validation:Optional
Applications *string `json:"applications,omitempty" tf:"applications,omitempty"`
// The cni for the k3s to install (the default is `flannel`) valid options are `cilium` or `flannel`
// +kubebuilder:validation:Optional
Cni *string `json:"cni,omitempty" tf:"cni,omitempty"`
// The existing firewall ID to use for this cluster
// +crossplane:generate:reference:type=github.com/upsidr/provider-civo-upjet/apis/civo/v1alpha1.CivoFirewall
// +kubebuilder:validation:Optional
FirewallID *string `json:"firewallId,omitempty" tf:"firewall_id,omitempty"`
// Reference to a CivoFirewall in civo to populate firewallId.
// +kubebuilder:validation:Optional
FirewallIDRef *v1.Reference `json:"firewallIdRef,omitempty" tf:"-"`
// Selector for a CivoFirewall in civo to populate firewallId.
// +kubebuilder:validation:Optional
FirewallIDSelector *v1.Selector `json:"firewallIdSelector,omitempty" tf:"-"`
// The version of k3s to install (optional, the default is currently the latest available)
// +kubebuilder:validation:Optional
KubernetesVersion *string `json:"kubernetesVersion,omitempty" tf:"kubernetes_version,omitempty"`
// Name for your cluster, must be unique within your account
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The network for the cluster, if not declare we use the default one
// +crossplane:generate:reference:type=github.com/upsidr/provider-civo-upjet/apis/civo/v1alpha1.CivoNetwork
// +kubebuilder:validation:Optional
NetworkID *string `json:"networkId,omitempty" tf:"network_id,omitempty"`
// Reference to a CivoNetwork in civo to populate networkId.
// +kubebuilder:validation:Optional
NetworkIDRef *v1.Reference `json:"networkIdRef,omitempty" tf:"-"`
// Selector for a CivoNetwork in civo to populate networkId.
// +kubebuilder:validation:Optional
NetworkIDSelector *v1.Selector `json:"networkIdSelector,omitempty" tf:"-"`
// The number of instances to create (optional, the default at the time of writing is 3)
// +kubebuilder:validation:Optional
NumTargetNodes *float64 `json:"numTargetNodes,omitempty" tf:"num_target_nodes,omitempty"`
// +kubebuilder:validation:Required
Pools []PoolsParameters `json:"pools" tf:"pools,omitempty"`
// The region for the cluster, if not declare we use the region in declared in the provider
// +kubebuilder:validation:Optional
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// Space separated list of tags, to be used freely as required
// +kubebuilder:validation:Optional
Tags *string `json:"tags,omitempty" tf:"tags,omitempty"`
// The size of each node (optional, the default is currently g4s.kube.medium)
// +kubebuilder:validation:Optional
TargetNodesSize *string `json:"targetNodesSize,omitempty" tf:"target_nodes_size,omitempty"`
}
type InstalledApplicationsObservation struct {
Application *string `json:"application,omitempty" tf:"application,omitempty"`
Category *string `json:"category,omitempty" tf:"category,omitempty"`
Installed *bool `json:"installed,omitempty" tf:"installed,omitempty"`
Version *string `json:"version,omitempty" tf:"version,omitempty"`
}
type InstalledApplicationsParameters struct {
}
type PoolsObservation struct {
// Instance names in the nodepool
InstanceNames []*string `json:"instanceNames,omitempty" tf:"instance_names,omitempty"`
}
type PoolsParameters struct {
// Node pool label, if you don't provide one, we will generate one for you
// +kubebuilder:validation:Optional
Label *string `json:"label,omitempty" tf:"label,omitempty"`
// Number of nodes in the nodepool
// +kubebuilder:validation:Required
NodeCount *float64 `json:"nodeCount" tf:"node_count,omitempty"`
// Size of the nodes in the nodepool
// +kubebuilder:validation:Required
Size *string `json:"size" tf:"size,omitempty"`
}
// CivoKubernetesClusterSpec defines the desired state of CivoKubernetesCluster
type CivoKubernetesClusterSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider CivoKubernetesClusterParameters `json:"forProvider"`
}
// CivoKubernetesClusterStatus defines the observed state of CivoKubernetesCluster.
type CivoKubernetesClusterStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider CivoKubernetesClusterObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// CivoKubernetesCluster is the Schema for the CivoKubernetesClusters 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,civo}
type CivoKubernetesCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CivoKubernetesClusterSpec `json:"spec"`
Status CivoKubernetesClusterStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// CivoKubernetesClusterList contains a list of CivoKubernetesClusters
type CivoKubernetesClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CivoKubernetesCluster `json:"items"`
}
// Repository type metadata.
var (
CivoKubernetesCluster_Kind = "CivoKubernetesCluster"
CivoKubernetesCluster_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: CivoKubernetesCluster_Kind}.String()
CivoKubernetesCluster_KindAPIVersion = CivoKubernetesCluster_Kind + "." + CRDGroupVersion.String()
CivoKubernetesCluster_GroupVersionKind = CRDGroupVersion.WithKind(CivoKubernetesCluster_Kind)
)
func init() {
SchemeBuilder.Register(&CivoKubernetesCluster{}, &CivoKubernetesClusterList{})
}