generated from crossplane/upjet-provider-template
/
zz_kustomization_types.go
executable file
·266 lines (195 loc) · 10.9 KB
/
zz_kustomization_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
264
265
266
/*
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 KustomizationMetaObservation struct {
// Annotations for the resource
Annotations map[string]*string `json:"annotations,omitempty" tf:"annotations,omitempty"`
// Description of the resource
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Labels for the resource
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Resource version of the resource
ResourceVersion *string `json:"resourceVersion,omitempty" tf:"resource_version,omitempty"`
// UID of the resource
UID *string `json:"uid,omitempty" tf:"uid,omitempty"`
}
type KustomizationMetaParameters struct {
// Annotations for the resource
// +kubebuilder:validation:Optional
Annotations map[string]*string `json:"annotations,omitempty" tf:"annotations,omitempty"`
// Description of the resource
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Labels for the resource
// +kubebuilder:validation:Optional
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
}
type KustomizationObservation struct {
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Metadata for the resource
Meta []KustomizationMetaObservation `json:"meta,omitempty" tf:"meta,omitempty"`
// Name of the Kustomization.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Name of Namespace.
NamespaceName *string `json:"namespaceName,omitempty" tf:"namespace_name,omitempty"`
// Scope for the kustomization, having one of the valid scopes: cluster, cluster_group.
Scope []KustomizationScopeObservation `json:"scope,omitempty" tf:"scope,omitempty"`
// Spec for the Repository.
Spec []KustomizationSpecObservation `json:"spec,omitempty" tf:"spec,omitempty"`
// Status for the Kustomization.
Status map[string]*string `json:"status,omitempty" tf:"status,omitempty"`
}
type KustomizationParameters struct {
// Metadata for the resource
// +kubebuilder:validation:Optional
Meta []KustomizationMetaParameters `json:"meta,omitempty" tf:"meta,omitempty"`
// Name of the Kustomization.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Name of Namespace.
// +kubebuilder:validation:Optional
NamespaceName *string `json:"namespaceName,omitempty" tf:"namespace_name,omitempty"`
// Scope for the kustomization, having one of the valid scopes: cluster, cluster_group.
// +kubebuilder:validation:Optional
Scope []KustomizationScopeParameters `json:"scope,omitempty" tf:"scope,omitempty"`
// Spec for the Repository.
// +kubebuilder:validation:Optional
Spec []KustomizationSpecParameters `json:"spec,omitempty" tf:"spec,omitempty"`
}
type KustomizationScopeClusterGroupObservation struct {
// Name of the cluster group
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type KustomizationScopeClusterGroupParameters struct {
// Name of the cluster group
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
}
type KustomizationScopeClusterObservation struct {
// Name of the management cluster
ManagementClusterName *string `json:"managementClusterName,omitempty" tf:"management_cluster_name,omitempty"`
// Name of this cluster
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Provisioner of the cluster
ProvisionerName *string `json:"provisionerName,omitempty" tf:"provisioner_name,omitempty"`
}
type KustomizationScopeClusterParameters struct {
// Name of the management cluster
// +kubebuilder:validation:Optional
ManagementClusterName *string `json:"managementClusterName,omitempty" tf:"management_cluster_name,omitempty"`
// Name of this cluster
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Provisioner of the cluster
// +kubebuilder:validation:Optional
ProvisionerName *string `json:"provisionerName,omitempty" tf:"provisioner_name,omitempty"`
}
type KustomizationScopeObservation struct {
// The schema for cluster full name
Cluster []KustomizationScopeClusterObservation `json:"cluster,omitempty" tf:"cluster,omitempty"`
// The schema for cluster group full name
ClusterGroup []KustomizationScopeClusterGroupObservation `json:"clusterGroup,omitempty" tf:"cluster_group,omitempty"`
}
type KustomizationScopeParameters struct {
// The schema for cluster full name
// +kubebuilder:validation:Optional
Cluster []KustomizationScopeClusterParameters `json:"cluster,omitempty" tf:"cluster,omitempty"`
// The schema for cluster group full name
// +kubebuilder:validation:Optional
ClusterGroup []KustomizationScopeClusterGroupParameters `json:"clusterGroup,omitempty" tf:"cluster_group,omitempty"`
}
type KustomizationSpecObservation struct {
// Interval defines the interval at which to reconcile kustomization.
Interval *string `json:"interval,omitempty" tf:"interval,omitempty"`
// Path within the source from which configurations will be applied. The path must exactly match what is in the repository.
Path *string `json:"path,omitempty" tf:"path,omitempty"`
// If true, the workloads will be deleted when the kustomization CR is deleted. When prune is enabled, removing the kustomization will trigger a removal of all kubernetes objects previously applied on all clusters of this cluster group by this kustomization.
Prune *bool `json:"prune,omitempty" tf:"prune,omitempty"`
// Reference to the source from which the configurations will be applied. Please select an existing repository.
Source []SourceObservation `json:"source,omitempty" tf:"source,omitempty"`
// TargetNamespace sets or overrides the namespaces of resources/kustomization yaml while applying on cluster. Namespace specified here must exist on cluster. It won't be created as a result of specifying here. Enter the name of the namespace you want the kustomization to be synced to. Entering a target namespace removes the need to specify a namespace in your kustomization. If the namespace does not exist in the cluster, syncing the kustomization will fail.
TargetNamespace *string `json:"targetNamespace,omitempty" tf:"target_namespace,omitempty"`
}
type KustomizationSpecParameters struct {
// Interval defines the interval at which to reconcile kustomization.
// +kubebuilder:validation:Optional
Interval *string `json:"interval,omitempty" tf:"interval,omitempty"`
// Path within the source from which configurations will be applied. The path must exactly match what is in the repository.
// +kubebuilder:validation:Required
Path *string `json:"path" tf:"path,omitempty"`
// If true, the workloads will be deleted when the kustomization CR is deleted. When prune is enabled, removing the kustomization will trigger a removal of all kubernetes objects previously applied on all clusters of this cluster group by this kustomization.
// +kubebuilder:validation:Optional
Prune *bool `json:"prune,omitempty" tf:"prune,omitempty"`
// Reference to the source from which the configurations will be applied. Please select an existing repository.
// +kubebuilder:validation:Required
Source []SourceParameters `json:"source" tf:"source,omitempty"`
// TargetNamespace sets or overrides the namespaces of resources/kustomization yaml while applying on cluster. Namespace specified here must exist on cluster. It won't be created as a result of specifying here. Enter the name of the namespace you want the kustomization to be synced to. Entering a target namespace removes the need to specify a namespace in your kustomization. If the namespace does not exist in the cluster, syncing the kustomization will fail.
// +kubebuilder:validation:Optional
TargetNamespace *string `json:"targetNamespace,omitempty" tf:"target_namespace,omitempty"`
}
type SourceObservation struct {
// Name of the repository.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Namespace of the repository.
Namespace *string `json:"namespace,omitempty" tf:"namespace,omitempty"`
}
type SourceParameters struct {
// Name of the repository.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Namespace of the repository.
// +kubebuilder:validation:Required
Namespace *string `json:"namespace" tf:"namespace,omitempty"`
}
// KustomizationSpec defines the desired state of Kustomization
type KustomizationSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider KustomizationParameters `json:"forProvider"`
}
// KustomizationStatus defines the observed state of Kustomization.
type KustomizationStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider KustomizationObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Kustomization is the Schema for the Kustomizations 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,tmc}
type Kustomization struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name)",message="name is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.namespaceName)",message="namespaceName is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.scope)",message="scope is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.spec)",message="spec is a required parameter"
Spec KustomizationSpec `json:"spec"`
Status KustomizationStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// KustomizationList contains a list of Kustomizations
type KustomizationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Kustomization `json:"items"`
}
// Repository type metadata.
var (
Kustomization_Kind = "Kustomization"
Kustomization_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Kustomization_Kind}.String()
Kustomization_KindAPIVersion = Kustomization_Kind + "." + CRDGroupVersion.String()
Kustomization_GroupVersionKind = CRDGroupVersion.WithKind(Kustomization_Kind)
)
func init() {
SchemeBuilder.Register(&Kustomization{}, &KustomizationList{})
}