diff --git a/README.md b/README.md index 7184312f..66c68fdc 100644 --- a/README.md +++ b/README.md @@ -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: +* `config/samples/databases_v1_postgresql.yaml` +* `doc/examples/custom_resources/cr-postgresql.starter.yaml` +* `doc/examples/custom_resources/cr-postgresql.enterprise.yaml` # Usage diff --git a/doc/examples/custom_resources/cr-postgresql.enterprise.yaml b/doc/examples/custom_resources/cr-postgresql.enterprise.yaml new file mode 100644 index 00000000..a0344890 --- /dev/null +++ b/doc/examples/custom_resources/cr-postgresql.enterprise.yaml @@ -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 diff --git a/doc/examples/custom_resources/cr-postgresql.starter.custom_rules.yaml b/doc/examples/custom_resources/cr-postgresql.starter.custom_rules.yaml new file mode 100644 index 00000000..0b98886d --- /dev/null +++ b/doc/examples/custom_resources/cr-postgresql.starter.custom_rules.yaml @@ -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 diff --git a/doc/examples/custom_resources/cr-postgresql.starter.yaml b/doc/examples/custom_resources/cr-postgresql.starter.yaml new file mode 100644 index 00000000..37c9b6cf --- /dev/null +++ b/doc/examples/custom_resources/cr-postgresql.starter.yaml @@ -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