-
Notifications
You must be signed in to change notification settings - Fork 196
/
gkehubfeaturemembership_types.go
332 lines (262 loc) · 13.9 KB
/
gkehubfeaturemembership_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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License 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.
// ----------------------------------------------------------------------------
//
// *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
//
// ----------------------------------------------------------------------------
//
// This file is automatically generated by Config Connector and manual
// changes will be clobbered when the file is regenerated.
//
// ----------------------------------------------------------------------------
// *** DISCLAIMER ***
// Config Connector's go-client for CRDs is currently in ALPHA, which means
// that future versions of the go-client may include breaking changes.
// Please try it out and give us feedback!
package v1beta1
import (
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type FeaturemembershipBinauthz struct {
/* Whether binauthz is enabled in this cluster. */
// +optional
Enabled *bool `json:"enabled,omitempty"`
}
type FeaturemembershipConfigSync struct {
// +optional
Git *FeaturemembershipGit `json:"git,omitempty"`
// +optional
MetricsGcpServiceAccountRef *v1alpha1.ResourceRef `json:"metricsGcpServiceAccountRef,omitempty"`
// +optional
Oci *FeaturemembershipOci `json:"oci,omitempty"`
/* Set to true to enable the Config Sync admission webhook to prevent drifts. If set to `false`, disables the Config Sync admission webhook and does not prevent drifts. */
// +optional
PreventDrift *bool `json:"preventDrift,omitempty"`
/* Specifies whether the Config Sync Repo is in "hierarchical" or "unstructured" mode. */
// +optional
SourceFormat *string `json:"sourceFormat,omitempty"`
}
type FeaturemembershipConfigmanagement struct {
/* **DEPRECATED** Binauthz configuration for the cluster. This field will be ignored and should not be set. */
// +optional
Binauthz *FeaturemembershipBinauthz `json:"binauthz,omitempty"`
/* Config Sync configuration for the cluster. */
// +optional
ConfigSync *FeaturemembershipConfigSync `json:"configSync,omitempty"`
/* Hierarchy Controller configuration for the cluster. */
// +optional
HierarchyController *FeaturemembershipHierarchyController `json:"hierarchyController,omitempty"`
/* Policy Controller configuration for the cluster. */
// +optional
PolicyController *FeaturemembershipPolicyController `json:"policyController,omitempty"`
/* Optional. Version of ACM to install. Defaults to the latest version. */
// +optional
Version *string `json:"version,omitempty"`
}
type FeaturemembershipGit struct {
// +optional
GcpServiceAccountRef *v1alpha1.ResourceRef `json:"gcpServiceAccountRef,omitempty"`
/* URL for the HTTPS proxy to be used when communicating with the Git repo. */
// +optional
HttpsProxy *string `json:"httpsProxy,omitempty"`
/* The path within the Git repository that represents the top level of the repo to sync. Default: the root directory of the repository. */
// +optional
PolicyDir *string `json:"policyDir,omitempty"`
/* Type of secret configured for access to the Git repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount or none. The validation of this is case-sensitive. */
// +optional
SecretType *string `json:"secretType,omitempty"`
/* The branch of the repository to sync from. Default: master. */
// +optional
SyncBranch *string `json:"syncBranch,omitempty"`
/* The URL of the Git repository to use as the source of truth. */
// +optional
SyncRepo *string `json:"syncRepo,omitempty"`
/* Git revision (tag or hash) to check out. Default HEAD. */
// +optional
SyncRev *string `json:"syncRev,omitempty"`
/* Period in seconds between consecutive syncs. Default: 15. */
// +optional
SyncWaitSecs *string `json:"syncWaitSecs,omitempty"`
}
type FeaturemembershipHierarchyController struct {
/* Whether hierarchical resource quota is enabled in this cluster. */
// +optional
EnableHierarchicalResourceQuota *bool `json:"enableHierarchicalResourceQuota,omitempty"`
/* Whether pod tree labels are enabled in this cluster. */
// +optional
EnablePodTreeLabels *bool `json:"enablePodTreeLabels,omitempty"`
/* Whether Hierarchy Controller is enabled in this cluster. */
// +optional
Enabled *bool `json:"enabled,omitempty"`
}
type FeaturemembershipMesh struct {
/* **DEPRECATED** Whether to automatically manage Service Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED, AUTOMATIC, MANUAL */
// +optional
ControlPlane *string `json:"controlPlane,omitempty"`
/* Whether to automatically manage Service Mesh. Possible values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL */
// +optional
Management *string `json:"management,omitempty"`
}
type FeaturemembershipMonitoring struct {
/* Specifies the list of backends Policy Controller will export to. Specifying an empty value `[]` disables metrics export. */
// +optional
Backends []string `json:"backends,omitempty"`
}
type FeaturemembershipOci struct {
// +optional
GcpServiceAccountRef *v1alpha1.ResourceRef `json:"gcpServiceAccountRef,omitempty"`
/* The absolute path of the directory that contains the local resources. Default: the root directory of the image. */
// +optional
PolicyDir *string `json:"policyDir,omitempty"`
/* Type of secret configured for access to the OCI Image. Must be one of gcenode, gcpserviceaccount or none. The validation of this is case-sensitive. */
// +optional
SecretType *string `json:"secretType,omitempty"`
/* The OCI image repository URL for the package to sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME. */
// +optional
SyncRepo *string `json:"syncRepo,omitempty"`
/* Period in seconds(int64 format) between consecutive syncs. Default: 15. */
// +optional
SyncWaitSecs *string `json:"syncWaitSecs,omitempty"`
}
type FeaturemembershipPolicyContent struct {
/* Configures the installation of the Template Library. */
// +optional
TemplateLibrary *FeaturemembershipTemplateLibrary `json:"templateLibrary,omitempty"`
}
type FeaturemembershipPolicyController struct {
/* Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether. */
// +optional
AuditIntervalSeconds *string `json:"auditIntervalSeconds,omitempty"`
/* Enables the installation of Policy Controller. If false, the rest of PolicyController fields take no effect. */
// +optional
Enabled *bool `json:"enabled,omitempty"`
/* The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster. */
// +optional
ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
/* Logs all denies and dry run failures. */
// +optional
LogDeniesEnabled *bool `json:"logDeniesEnabled,omitempty"`
/* Specifies the backends Policy Controller should export metrics to. For example, to specify metrics should be exported to Cloud Monitoring and Prometheus, specify backends: ["cloudmonitoring", "prometheus"]. Default: ["cloudmonitoring", "prometheus"] */
// +optional
Monitoring *FeaturemembershipMonitoring `json:"monitoring,omitempty"`
/* Enable or disable mutation in policy controller. If true, mutation CRDs, webhook and controller deployment will be deployed to the cluster. */
// +optional
MutationEnabled *bool `json:"mutationEnabled,omitempty"`
/* Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated. */
// +optional
ReferentialRulesEnabled *bool `json:"referentialRulesEnabled,omitempty"`
/* Installs the default template library along with Policy Controller. */
// +optional
TemplateLibraryInstalled *bool `json:"templateLibraryInstalled,omitempty"`
}
type FeaturemembershipPolicyControllerHubConfig struct {
/* Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether. */
// +optional
AuditIntervalSeconds *int64 `json:"auditIntervalSeconds,omitempty"`
/* The maximum number of audit violations to be stored in a constraint. If not set, the internal default of 20 will be used. */
// +optional
ConstraintViolationLimit *int64 `json:"constraintViolationLimit,omitempty"`
/* The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster. */
// +optional
ExemptableNamespaces []string `json:"exemptableNamespaces,omitempty"`
/* Configures the mode of the Policy Controller installation. Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED, INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED */
// +optional
InstallSpec *string `json:"installSpec,omitempty"`
/* Logs all denies and dry run failures. */
// +optional
LogDeniesEnabled *bool `json:"logDeniesEnabled,omitempty"`
/* Specifies the backends Policy Controller should export metrics to. For example, to specify metrics should be exported to Cloud Monitoring and Prometheus, specify backends: ["cloudmonitoring", "prometheus"]. Default: ["cloudmonitoring", "prometheus"] */
// +optional
Monitoring *FeaturemembershipMonitoring `json:"monitoring,omitempty"`
/* Enables the ability to mutate resources using Policy Controller. */
// +optional
MutationEnabled *bool `json:"mutationEnabled,omitempty"`
/* Specifies the desired policy content on the cluster. */
// +optional
PolicyContent *FeaturemembershipPolicyContent `json:"policyContent,omitempty"`
/* Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated. */
// +optional
ReferentialRulesEnabled *bool `json:"referentialRulesEnabled,omitempty"`
}
type FeaturemembershipPolicycontroller struct {
/* Policy Controller configuration for the cluster. */
PolicyControllerHubConfig FeaturemembershipPolicyControllerHubConfig `json:"policyControllerHubConfig"`
/* Optional. Version of Policy Controller to install. Defaults to the latest version. */
// +optional
Version *string `json:"version,omitempty"`
}
type FeaturemembershipTemplateLibrary struct {
/* Configures the manner in which the template library is installed on the cluster. Possible values: INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL */
// +optional
Installation *string `json:"installation,omitempty"`
}
type GKEHubFeatureMembershipSpec struct {
/* Config Management-specific spec. */
// +optional
Configmanagement *FeaturemembershipConfigmanagement `json:"configmanagement,omitempty"`
/* Immutable. */
FeatureRef v1alpha1.ResourceRef `json:"featureRef"`
/* Immutable. The location of the feature */
Location string `json:"location"`
/* Immutable. The location of the membership */
// +optional
MembershipLocation *string `json:"membershipLocation,omitempty"`
/* Immutable. */
MembershipRef v1alpha1.ResourceRef `json:"membershipRef"`
/* Manage Mesh Features */
// +optional
Mesh *FeaturemembershipMesh `json:"mesh,omitempty"`
/* Policy Controller-specific spec. */
// +optional
Policycontroller *FeaturemembershipPolicycontroller `json:"policycontroller,omitempty"`
/* Immutable. The Project that this resource belongs to. */
ProjectRef v1alpha1.ResourceRef `json:"projectRef"`
}
type GKEHubFeatureMembershipStatus struct {
/* Conditions represent the latest available observations of the
GKEHubFeatureMembership's current state. */
Conditions []v1alpha1.Condition `json:"conditions,omitempty"`
/* ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. */
// +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=gcp,shortName=gcpgkehubfeaturemembership;gcpgkehubfeaturememberships
// +kubebuilder:subresource:status
// +kubebuilder:metadata:labels="cnrm.cloud.google.com/dcl2crd=true";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/system=true"
// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date"
// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded"
// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'"
// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'"
// GKEHubFeatureMembership is the Schema for the gkehub API
// +k8s:openapi-gen=true
type GKEHubFeatureMembership struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GKEHubFeatureMembershipSpec `json:"spec,omitempty"`
Status GKEHubFeatureMembershipStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// GKEHubFeatureMembershipList contains a list of GKEHubFeatureMembership
type GKEHubFeatureMembershipList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []GKEHubFeatureMembership `json:"items"`
}
func init() {
SchemeBuilder.Register(&GKEHubFeatureMembership{}, &GKEHubFeatureMembershipList{})
}