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