1---
2apiVersion: apiextensions.k8s.io/v1
3kind: CustomResourceDefinition
4metadata:
5 annotations:
6 controller-gen.kubebuilder.io/version: (unknown)
7 name: sqlinstances.sql.cnrm.cloud.google.com
8spec:
9 group: sql.cnrm.cloud.google.com
10 names:
11 kind: SQLInstance
12 listKind: SQLInstanceList
13 plural: sqlinstances
14 singular: sqlinstance
15 scope: Namespaced
16 versions:
17 - name: v1beta1
18 schema:
19 openAPIV3Schema:
20 description: SQLInstance is the Schema for the sql API
21 properties:
22 apiVersion:
23 description: |-
24 APIVersion defines the versioned schema of this representation of an object.
25 Servers should convert recognized schemas to the latest internal value, and
26 may reject unrecognized values.
27 More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
28 type: string
29 kind:
30 description: |-
31 Kind is a string value representing the REST resource this object represents.
32 Servers may infer this from the endpoint the client submits requests to.
33 Cannot be updated.
34 In CamelCase.
35 More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
36 type: string
37 metadata:
38 type: object
39 spec:
40 properties:
41 databaseVersion:
42 description: The MySQL, PostgreSQL or SQL Server (beta) version to
43 use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,
44 POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14,
45 SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS,
46 SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date
47 reference of supported versions.
48 type: string
49 encryptionKMSCryptoKeyRef:
50 properties:
51 external:
52 description: The external name of the referenced resource
53 type: string
54 kind:
55 description: Kind of the referent.
56 type: string
57 name:
58 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
59 type: string
60 namespace:
61 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
62 type: string
63 type: object
64 instanceType:
65 description: The type of the instance. The valid values are:- 'SQL_INSTANCE_TYPE_UNSPECIFIED',
66 'CLOUD_SQL_INSTANCE', 'ON_PREMISES_INSTANCE' and 'READ_REPLICA_INSTANCE'.
67 type: string
68 maintenanceVersion:
69 description: Maintenance version.
70 type: string
71 masterInstanceRef:
72 properties:
73 external:
74 description: The external name of the referenced resource
75 type: string
76 kind:
77 description: Kind of the referent.
78 type: string
79 name:
80 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
81 type: string
82 namespace:
83 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
84 type: string
85 type: object
86 region:
87 description: Immutable. The region the instance will sit in. Note,
88 Cloud SQL is not available in all regions. A valid region must be
89 provided to use this resource. If a region is not provided in the
90 resource definition, the provider region will be used instead, but
91 this will be an apply-time error for instances if the provider region
92 is not supported with Cloud SQL. If you choose not to provide the
93 region argument for this resource, make sure you understand this.
94 type: string
95 replicaConfiguration:
96 description: The configuration for replication.
97 properties:
98 caCertificate:
99 description: Immutable. PEM representation of the trusted CA's
100 x509 certificate.
101 type: string
102 clientCertificate:
103 description: Immutable. PEM representation of the replica's x509
104 certificate.
105 type: string
106 clientKey:
107 description: Immutable. PEM representation of the replica's private
108 key. The corresponding public key in encoded in the client_certificate.
109 type: string
110 connectRetryInterval:
111 description: Immutable. The number of seconds between connect
112 retries. MySQL's default is 60 seconds.
113 type: integer
114 dumpFilePath:
115 description: Immutable. Path to a SQL file in Google Cloud Storage
116 from which replica instances are created. Format is gs://bucket/filename.
117 type: string
118 failoverTarget:
119 description: Immutable. Specifies if the replica is the failover
120 target. If the field is set to true the replica will be designated
121 as a failover replica. If the master instance fails, the replica
122 instance will be promoted as the new master instance.
123 type: boolean
124 masterHeartbeatPeriod:
125 description: Immutable. Time in ms between replication heartbeats.
126 type: integer
127 password:
128 description: Immutable. Password for the replication connection.
129 properties:
130 value:
131 description: Value of the field. Cannot be used if 'valueFrom'
132 is specified.
133 type: string
134 valueFrom:
135 description: Source for the field's value. Cannot be used
136 if 'value' is specified.
137 properties:
138 secretKeyRef:
139 description: Reference to a value with the given key in
140 the given Secret in the resource's namespace.
141 properties:
142 external:
143 description: The external name of the referenced resource
144 type: string
145 kind:
146 description: Kind of the referent.
147 type: string
148 name:
149 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
150 type: string
151 namespace:
152 description: 'Namespace of the referent. More info:
153 https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
154 type: string
155 type: object
156 type: object
157 type: object
158 sslCipher:
159 description: Immutable. Permissible ciphers for use in SSL encryption.
160 type: string
161 username:
162 description: Immutable. Username for replication connection.
163 type: string
164 verifyServerCertificate:
165 description: Immutable. True if the master's common name value
166 is checked during the SSL handshake.
167 type: boolean
168 type: object
169 resourceID:
170 description: Immutable. Optional. The name of the resource. Used for
171 creation and acquisition. When unset, the value of `metadata.name`
172 is used as the default.
173 type: string
174 rootPassword:
175 description: Initial root password. Required for MS SQL Server.
176 properties:
177 value:
178 description: Value of the field. Cannot be used if 'valueFrom'
179 is specified.
180 type: string
181 valueFrom:
182 description: Source for the field's value. Cannot be used if 'value'
183 is specified.
184 properties:
185 secretKeyRef:
186 description: Reference to a value with the given key in the
187 given Secret in the resource's namespace.
188 properties:
189 external:
190 description: The external name of the referenced resource
191 type: string
192 kind:
193 description: Kind of the referent.
194 type: string
195 name:
196 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
197 type: string
198 namespace:
199 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
200 type: string
201 type: object
202 type: object
203 type: object
204 settings:
205 description: The settings to use for the database. The configuration
206 is detailed below.
207 properties:
208 activationPolicy:
209 description: This specifies when the instance should be active.
210 Can be either ALWAYS, NEVER or ON_DEMAND.
211 type: string
212 activeDirectoryConfig:
213 properties:
214 domain:
215 description: Domain name of the Active Directory for SQL Server
216 (e.g., mydomain.com).
217 type: string
218 required:
219 - domain
220 type: object
221 advancedMachineFeatures:
222 properties:
223 threadsPerCore:
224 description: The number of threads per physical core. Can
225 be 1 or 2.
226 type: integer
227 type: object
228 authorizedGaeApplications:
229 description: |-
230 DEPRECATED. This property is only applicable to First Generation instances, and First Generation instances are now deprecated. see https://cloud.google.com/sql/docs/mysql/deprecation-notice for information on how to upgrade to Second Generation instances.
231 Specifying this field has no-ops; it's recommended to remove this field from your configuration.
232 items:
233 type: string
234 type: array
235 availabilityType:
236 description: |-
237 The availability type of the Cloud SQL instance, high availability
238 (REGIONAL) or single zone (ZONAL). For all instances, ensure that
239 settings.backup_configuration.enabled is set to true.
240 For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true.
241 For Postgres instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled
242 is set to true. Defaults to ZONAL.
243 type: string
244 backupConfiguration:
245 properties:
246 backupRetentionSettings:
247 properties:
248 retainedBackups:
249 description: Number of backups to retain.
250 type: integer
251 retentionUnit:
252 description: The unit that 'retainedBackups' represents.
253 Defaults to COUNT.
254 type: string
255 required:
256 - retainedBackups
257 type: object
258 binaryLogEnabled:
259 description: True if binary logging is enabled. If settings.backup_configuration.enabled
260 is false, this must be as well. Can only be used with MySQL.
261 type: boolean
262 enabled:
263 description: True if backup configuration is enabled.
264 type: boolean
265 location:
266 description: Location of the backup configuration.
267 type: string
268 pointInTimeRecoveryEnabled:
269 description: True if Point-in-time recovery is enabled.
270 type: boolean
271 startTime:
272 description: HH:MM format time indicating when backup configuration
273 starts.
274 type: string
275 transactionLogRetentionDays:
276 description: The number of days of transaction logs we retain
277 for point in time restore, from 1-7.
278 type: integer
279 type: object
280 collation:
281 description: Immutable. The name of server instance collation.
282 type: string
283 connectorEnforcement:
284 description: Specifies if connections must use Cloud SQL connectors.
285 type: string
286 crashSafeReplication:
287 description: |-
288 DEPRECATED. This property is only applicable to First Generation instances, and First Generation instances are now deprecated. see https://cloud.google.com/sql/docs/mysql/deprecation-notice for information on how to upgrade to Second Generation instances.
289 Specifying this field has no-ops; it's recommended to remove this field from your configuration.
290 type: boolean
291 databaseFlags:
292 items:
293 properties:
294 name:
295 description: Name of the flag.
296 type: string
297 value:
298 description: Value of the flag.
299 type: string
300 required:
301 - name
302 - value
303 type: object
304 type: array
305 deletionProtectionEnabled:
306 description: Configuration to protect against accidental instance
307 deletion.
308 type: boolean
309 denyMaintenancePeriod:
310 properties:
311 endDate:
312 description: End date before which maintenance will not take
313 place. The date is in format yyyy-mm-dd i.e., 2020-11-01,
314 or mm-dd, i.e., 11-01.
315 type: string
316 startDate:
317 description: Start date after which maintenance will not take
318 place. The date is in format yyyy-mm-dd i.e., 2020-11-01,
319 or mm-dd, i.e., 11-01.
320 type: string
321 time:
322 description: 'Time in UTC when the "deny maintenance period"
323 starts on start_date and ends on end_date. The time is in
324 format: HH:mm:SS, i.e., 00:00:00.'
325 type: string
326 required:
327 - endDate
328 - startDate
329 - time
330 type: object
331 diskAutoresize:
332 description: Enables auto-resizing of the storage size. Defaults
333 to true.
334 type: boolean
335 diskAutoresizeLimit:
336 description: The maximum size, in GB, to which storage capacity
337 can be automatically increased. The default value is 0, which
338 specifies that there is no limit.
339 type: integer
340 diskSize:
341 description: The size of data disk, in GB. Size of a running instance
342 cannot be reduced but can be increased. The minimum value is
343 10GB.
344 type: integer
345 diskType:
346 description: 'Immutable. The type of data disk: PD_SSD or PD_HDD.
347 Defaults to PD_SSD.'
348 type: string
349 insightsConfig:
350 description: Configuration of Query Insights.
351 properties:
352 queryInsightsEnabled:
353 description: True if Query Insights feature is enabled.
354 type: boolean
355 queryPlansPerMinute:
356 description: Number of query execution plans captured by Insights
357 per minute for all queries combined. Between 0 and 20. Default
358 to 5.
359 type: integer
360 queryStringLength:
361 description: Maximum query length stored in bytes. Between
362 256 and 4500. Default to 1024.
363 type: integer
364 recordApplicationTags:
365 description: True if Query Insights will record application
366 tags from query when enabled.
367 type: boolean
368 recordClientAddress:
369 description: True if Query Insights will record client address
370 when enabled.
371 type: boolean
372 type: object
373 ipConfiguration:
374 properties:
375 allocatedIpRange:
376 description: 'The name of the allocated ip range for the private
377 ip CloudSQL instance. For example: "google-managed-services-default".
378 If set, the instance ip will be created in the allocated
379 range. The range name must comply with RFC 1035. Specifically,
380 the name must be 1-63 characters long and match the regular
381 expression [a-z]([-a-z0-9]*[a-z0-9])?.'
382 type: string
383 authorizedNetworks:
384 items:
385 properties:
386 expirationTime:
387 type: string
388 name:
389 type: string
390 value:
391 type: string
392 required:
393 - value
394 type: object
395 type: array
396 enablePrivatePathForGoogleCloudServices:
397 description: Whether Google Cloud services such as BigQuery
398 are allowed to access data in this Cloud SQL instance over
399 a private IP connection. SQLSERVER database type is not
400 supported.
401 type: boolean
402 ipv4Enabled:
403 description: Whether this Cloud SQL instance should be assigned
404 a public IPV4 address. At least ipv4_enabled must be enabled
405 or a private_network must be configured.
406 type: boolean
407 privateNetworkRef:
408 properties:
409 external:
410 description: The external name of the referenced resource
411 type: string
412 kind:
413 description: Kind of the referent.
414 type: string
415 name:
416 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
417 type: string
418 namespace:
419 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
420 type: string
421 type: object
422 requireSsl:
423 type: boolean
424 type: object
425 locationPreference:
426 properties:
427 followGaeApplication:
428 description: A Google App Engine application whose zone to
429 remain in. Must be in the same region as this instance.
430 type: string
431 secondaryZone:
432 description: The preferred Compute Engine zone for the secondary/failover.
433 type: string
434 zone:
435 description: The preferred compute engine zone.
436 type: string
437 type: object
438 maintenanceWindow:
439 description: Declares a one-hour maintenance window when an Instance
440 can automatically restart to apply updates. The maintenance
441 window is specified in UTC time.
442 properties:
443 day:
444 description: Day of week (1-7), starting on Monday.
445 type: integer
446 hour:
447 description: Hour of day (0-23), ignored if day not set.
448 type: integer
449 updateTrack:
450 description: Receive updates earlier (canary) or later (stable).
451 type: string
452 type: object
453 passwordValidationPolicy:
454 properties:
455 complexity:
456 description: Password complexity.
457 type: string
458 disallowUsernameSubstring:
459 description: Disallow username as a part of the password.
460 type: boolean
461 enablePasswordPolicy:
462 description: Whether the password policy is enabled or not.
463 type: boolean
464 minLength:
465 description: Minimum number of characters allowed.
466 type: integer
467 passwordChangeInterval:
468 description: Minimum interval after which the password can
469 be changed. This flag is only supported for PostgresSQL.
470 type: string
471 reuseInterval:
472 description: Number of previous passwords that cannot be reused.
473 type: integer
474 required:
475 - enablePasswordPolicy
476 type: object
477 pricingPlan:
478 description: Pricing plan for this instance, can only be PER_USE.
479 type: string
480 replicationType:
481 description: |-
482 DEPRECATED. This property is only applicable to First Generation instances, and First Generation instances are now deprecated. see https://cloud.google.com/sql/docs/mysql/deprecation-notice for information on how to upgrade to Second Generation instances.
483 Specifying this field has no-ops; it's recommended to remove this field from your configuration.
484 type: string
485 sqlServerAuditConfig:
486 properties:
487 bucketRef:
488 description: The name of the destination bucket (e.g., gs://mybucket).
489 properties:
490 external:
491 description: The external name of the referenced resource
492 type: string
493 kind:
494 description: Kind of the referent.
495 type: string
496 name:
497 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
498 type: string
499 namespace:
500 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
501 type: string
502 type: object
503 retentionInterval:
504 description: 'How long to keep generated audit files. A duration
505 in seconds with up to nine fractional digits, terminated
506 by ''s''. Example: "3.5s"..'
507 type: string
508 uploadInterval:
509 description: 'How often to upload generated audit files. A
510 duration in seconds with up to nine fractional digits, terminated
511 by ''s''. Example: "3.5s".'
512 type: string
513 type: object
514 tier:
515 description: The machine type to use. See tiers for more details
516 and supported versions. Postgres supports only shared-core machine
517 types, and custom machine types such as db-custom-2-13312. See
518 the Custom Machine Type Documentation to learn about specifying
519 custom machine types.
520 type: string
521 timeZone:
522 description: Immutable. The time_zone to be used by the database
523 engine (supported only for SQL Server), in SQL Server timezone
524 format.
525 type: string
526 required:
527 - tier
528 type: object
529 required:
530 - settings
531 type: object
532 status:
533 properties:
534 availableMaintenanceVersions:
535 description: Available Maintenance versions.
536 items:
537 type: string
538 type: array
539 conditions:
540 description: |-
541 Conditions represent the latest available observations of the
542 SQLInstance's current state.
543 items:
544 properties:
545 lastTransitionTime:
546 description: Last time the condition transitioned from one status
547 to another.
548 type: string
549 message:
550 description: Human-readable message indicating details about
551 last transition.
552 type: string
553 reason:
554 description: |-
555 Unique, one-word, CamelCase reason for the condition's last
556 transition.
557 type: string
558 status:
559 description: Status is the status of the condition. Can be True,
560 False, Unknown.
561 type: string
562 type:
563 description: Type is the type of the condition.
564 type: string
565 type: object
566 type: array
567 connectionName:
568 description: The connection name of the instance to be used in connection
569 strings. For example, when connecting with Cloud SQL Proxy.
570 type: string
571 firstIpAddress:
572 type: string
573 instanceType:
574 description: The type of the instance. The valid values are:- 'SQL_INSTANCE_TYPE_UNSPECIFIED',
575 'CLOUD_SQL_INSTANCE', 'ON_PREMISES_INSTANCE' and 'READ_REPLICA_INSTANCE'.
576 type: string
577 ipAddress:
578 items:
579 properties:
580 ipAddress:
581 type: string
582 timeToRetire:
583 type: string
584 type:
585 type: string
586 type: object
587 type: array
588 observedGeneration:
589 description: ObservedGeneration is the generation of the resource
590 that was most recently observed by the Config Connector controller.
591 If this is equal to metadata.generation, then that means that the
592 current reported status reflects the most recent desired state of
593 the resource.
594 type: integer
595 privateIpAddress:
596 type: string
597 publicIpAddress:
598 type: string
599 selfLink:
600 description: The URI of the created resource.
601 type: string
602 serverCaCert:
603 properties:
604 cert:
605 description: The CA Certificate used to connect to the SQL Instance
606 via SSL.
607 type: string
608 commonName:
609 description: The CN valid for the CA Cert.
610 type: string
611 createTime:
612 description: Creation time of the CA Cert.
613 type: string
614 expirationTime:
615 description: Expiration time of the CA Cert.
616 type: string
617 sha1Fingerprint:
618 description: SHA Fingerprint of the CA Cert.
619 type: string
620 type: object
621 serviceAccountEmailAddress:
622 description: The service account email address assigned to the instance.
623 type: string
624 type: object
625 type: object
626 served: true
627 storage: true
View as plain text