Skip to content

Commit

Permalink
Update documentation for CloudSqlInstance and CloudSqlDatabase
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenlj committed Oct 2, 2024
1 parent 60ff560 commit 9e3e984
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 18 deletions.
10 changes: 6 additions & 4 deletions charts/templates/nais.io_applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,9 @@ spec:
type: object
type: array
sqlInstances:
description: Provision database instances and connect them to
your application.
description: |-
Provision database instances and connect them to your application.
Only one item allowed in the list.
items:
properties:
autoBackupHour:
Expand All @@ -576,8 +577,9 @@ spec:
description: Sort order for `ORDER BY ...` clauses.
type: string
databases:
description: List of databases that should be created on
this Postgres server.
description: |-
List of one database or less(!) that should be created on this Postgres server.
If not present, a default database with the same name as the application will be created.
items:
properties:
envVarPrefix:
Expand Down
10 changes: 6 additions & 4 deletions charts/templates/nais.io_naisjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,9 @@ spec:
type: object
type: array
sqlInstances:
description: Provision database instances and connect them to
your application.
description: |-
Provision database instances and connect them to your application.
Only one item allowed in the list.
items:
properties:
autoBackupHour:
Expand All @@ -537,8 +538,9 @@ spec:
description: Sort order for `ORDER BY ...` clauses.
type: string
databases:
description: List of databases that should be created on
this Postgres server.
description: |-
List of one database or less(!) that should be created on this Postgres server.
If not present, a default database with the same name as the application will be created.
items:
properties:
envVarPrefix:
Expand Down
10 changes: 6 additions & 4 deletions config/crd/bases/nais.io_applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,9 @@ spec:
type: object
type: array
sqlInstances:
description: Provision database instances and connect them to
your application.
description: |-
Provision database instances and connect them to your application.
Only one item allowed in the list.
items:
properties:
autoBackupHour:
Expand All @@ -576,8 +577,9 @@ spec:
description: Sort order for `ORDER BY ...` clauses.
type: string
databases:
description: List of databases that should be created on
this Postgres server.
description: |-
List of one database or less(!) that should be created on this Postgres server.
If not present, a default database with the same name as the application will be created.
items:
properties:
envVarPrefix:
Expand Down
10 changes: 6 additions & 4 deletions config/crd/bases/nais.io_naisjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,9 @@ spec:
type: object
type: array
sqlInstances:
description: Provision database instances and connect them to
your application.
description: |-
Provision database instances and connect them to your application.
Only one item allowed in the list.
items:
properties:
autoBackupHour:
Expand All @@ -537,8 +538,9 @@ spec:
description: Sort order for `ORDER BY ...` clauses.
type: string
databases:
description: List of databases that should be created on
this Postgres server.
description: |-
List of one database or less(!) that should be created on this Postgres server.
If not present, a default database with the same name as the application will be created.
items:
properties:
envVarPrefix:
Expand Down
5 changes: 3 additions & 2 deletions pkg/apis/nais.io/v1/naiserator_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ type GCP struct {
// +nais:doc:Availability=GCP
Buckets []CloudStorageBucket `json:"buckets,omitempty"`
// Provision database instances and connect them to your application.
// Only one item allowed in the list.
// +nais:doc:Link="https://doc.nais.io/persistence/postgres/";"https://cloud.google.com/sql/docs/postgres/instance-settings#impact"
// +nais:doc:Availability=GCP
// +kubebuilder:validation:MaxItems=1
Expand Down Expand Up @@ -582,8 +583,8 @@ type CloudSqlInstance struct {
TransactionLogRetentionDays *int `json:"transactionLogRetentionDays,omitempty"`
// Desired maintenance window for database updates.
Maintenance *Maintenance `json:"maintenance,omitempty"`
// List of databases that should be created on this Postgres server.
// +kubebuilder:validation:Required
// List of one database or less(!) that should be created on this Postgres server.
// If not present, a default database with the same name as the application will be created.
// +kubebuilder:validation:MaxItems=1
Databases []CloudSqlDatabase `json:"databases,omitempty"`
// Remove the entire Postgres server including all data when the Kubernetes resource is deleted.
Expand Down

0 comments on commit 9e3e984

Please sign in to comment.