Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ Example:

A CR is an actual instance of the type defined by the CRD.

Example:
`config/samples/databases_v1_postgresql.yaml`
Examples:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the PR you add three files, but only two in the list, did you miss one? (the custom resource is not in the list)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did on purpose, I expect these examples to grow in the future, and I've listed the most significant ones.

* `config/samples/databases_v1_postgresql.yaml`
* `doc/examples/custom_resources/cr-postgresql.starter.yaml`
* `doc/examples/custom_resources/cr-postgresql.enterprise.yaml`

# Usage

Expand Down
33 changes: 33 additions & 0 deletions doc/examples/custom_resources/cr-postgresql.enterprise.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Custom Resource example
#
# Use your own values for these fields:
# * metadata.name
# * spec.name
# * spec.connInfoSecretTarget.name
#
apiVersion: databases.scalingo.com/v1
kind: PostgreSQL
metadata:
labels:
app.kubernetes.io/name: scalingo-operator
app.kubernetes.io/managed-by: kustomize
name: postgresql-sample
spec:
authSecret:
name: scalingo
key: api_token
connInfoSecretTarget:
name: my-postgresql-secret

networking:
internet_access:
enabled: true
firewall:
rules:
- type: "custom_range"
cidr: "0.0.0.0/0"
label: "Allow all"

name: my-postgresql-database
plan: postgresql-dr-enterprise-4096
region: osc-fr1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Custom Resource example
#
# Use your own values for these fields:
# * metadata.name
# * spec.name
# * spec.connInfoSecretTarget.name
#
apiVersion: databases.scalingo.com/v1
kind: PostgreSQL
metadata:
labels:
app.kubernetes.io/name: scalingo-operator
app.kubernetes.io/managed-by: kustomize
name: postgresql-sample
spec:
authSecret:
name: scalingo
key: api_token
connInfoSecretTarget:
name: my-postgresql-secret

networking:
internet_access:
enabled: true
firewall:
rules:
- type: "custom_range"
cidr: "192.168.0.0/24"
- type: "custom_range"
cidr: "192.168.1.1/32"
- type: "custom_range"
cidr: "192.168.1.2/32"
- type: "custom_range"
cidr: "192.168.1.3/32"
- type: "managed_range"
range_id: "man-osc-fr1-egress"

name: my-postgresql-database
plan: postgresql-dr-starter-4096
region: osc-fr1
33 changes: 33 additions & 0 deletions doc/examples/custom_resources/cr-postgresql.starter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Custom Resource example
#
# Use your own values for these fields:
# * metadata.name
# * spec.name
# * spec.connInfoSecretTarget.name
#
apiVersion: databases.scalingo.com/v1
kind: PostgreSQL
metadata:
labels:
app.kubernetes.io/name: scalingo-operator
app.kubernetes.io/managed-by: kustomize
name: postgresql-sample
spec:
authSecret:
name: scalingo
key: api_token
connInfoSecretTarget:
name: my-postgresql-secret

networking:
internet_access:
enabled: true
firewall:
rules:
- type: "custom_range"
cidr: "0.0.0.0/0"
label: "Allow all"

name: my-postgresql-database
plan: postgresql-dr-starter-4096
region: osc-fr1